Class SceneGizmos

The SceneGizmos renders gizmos that use the drawGizmo method decorator for the specified Camera.

All decorated methods that are known by the editor will automatically become available. Unlike SceneInteractiveGizmos, the gizmos are passive and only draw extension within the editor.

Hierarchy

  • FrameworkObject
    • SceneGizmos

Constructors

Accessors

Methods

  • Clears the currently selected/active interactive gizmo for the specified camera.

    Returns void

  • Order the gizmo drawing system to draw the current scene.

    Returns void

  • Gets the current gizmo for the specified component. If the component has no active gizmo, null is returned.

    Parameters

    Returns InteractiveGizmo[]

  • Gets the list of registered gizmo types.

    Use setGizmosEnabled to control whether a gizmo is available for instancing.

    Returns RegisteredGizmo[]

  • Is any interactive gizmo selected/active on the specified camera.

    Returns boolean

  • Register a gizmo.

    Parameters

    Returns void

    To remove the gizmo, call InteractiveGizmo.Destroy.

  • Sets the state of the specified gizmoClasses.

    Parameters

    • gizmoClasses: Type[]
    • isEnabled: boolean

    Returns void

  • Parameters

    Returns void

  • Select a interactive gizmo at the specified location, if there is any under the pointer. Makes the selected interactive gizmo active and draggable.

    Parameters

    • inputPosition: Immutable<Vector2>

      Position of the pointer, relative to the provided camera viewport.

    Returns boolean

    True if interactive gizmo active state changed, false otherwise.

  • Required to be called everyframe to update all interactive gizmos with new event data.

    Parameters

    • viewportPositionInPixels: Immutable<Vector2>

      Position of the pointer, relative to the provided camera viewport, in pixels.

    • inputDeltaInPixels: Immutable<Vector2>

      Determines pointer movement since last call to this method.

    Returns boolean

    True if an interactive gizmo handled the event.

Events

onGizmoDraw: Event<[], void>

Triggered when the gizmos begin to draw.

Use this event to perform custom Gizmo drawing outside of methods decorated with the `` attribute.