Description
The HasSelected
property is a static boolean property of the Gizmo
class in the Sandbox namespace. It indicates whether any gizmo has been selected in the current context. This property is useful for determining if a selection action has occurred, which can be critical for handling user interactions in a graphical user interface or a 3D environment.
Usage
Use the HasSelected
property to check if any gizmo is currently selected. This can be particularly useful in scenarios where you need to perform actions based on the selection state of gizmos, such as enabling or disabling certain UI elements or triggering specific events.
Example
// Example usage of Gizmo.HasSelected
if (Gizmo.HasSelected)
{
// Perform actions when a gizmo is selected
// For example, enable a UI button or highlight the selected gizmo
EnableSelectionUI();
} else {
// Perform actions when no gizmo is selected
DisableSelectionUI();
}