Sandbox.Gizmo/Instance GizmoInstance { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The GizmoInstance property of the SceneRenderingWidget class provides access to the current instance of a gizmo being used within the scene rendering context. Gizmos are visual tools that assist in the manipulation and visualization of objects within a scene, such as translation, rotation, and scaling handles.

Usage

To use the GizmoInstance property, you must have an instance of the SceneRenderingWidget class. You can then access the property to get or set the current gizmo instance. This is useful for customizing the behavior or appearance of gizmos in your scene editor.

Example

// Assuming you have an instance of SceneRenderingWidget
SceneRenderingWidget widget = new SceneRenderingWidget();

// Access the GizmoInstance property
Gizmo.Instance currentGizmo = widget.GizmoInstance;

// You can now manipulate the gizmo instance as needed
if (currentGizmo != null)
{
    // Example: Change the gizmo's color
    currentGizmo.Color = Color.Red;
}