Description
The IsPressed
property is a static boolean property of the Gizmo
class in the Sandbox namespace. It indicates whether a gizmo is currently being pressed. However, this property is marked as obsolete and should not be used in new code. Instead, it is recommended to use Gizmo.Pressed.This
for checking if a gizmo is pressed.
Usage
To check if a gizmo is pressed, use the recommended Gizmo.Pressed.This
instead of Gizmo.IsPressed
as the latter is obsolete.
Example
// Example of using the recommended property
bool isGizmoPressed = Gizmo.Pressed.This;
// Obsolete usage (not recommended)
// bool isPressed = Gizmo.IsPressed; // This will generate a warning due to obsolescence