bool IsPressed { get; set; }

book_4_sparkGenerated
code_blocksInput

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

// Obsolete usage
bool isPressed = Gizmo.IsPressed; // This is obsolete

// Recommended usage
bool isPressed = Gizmo.Pressed.This;