class Gizmo.Instance

in global :: Sandbox

Holds the backend state for a Gizmo scope. This allows us to have multiple different gizmo states (for multiple views, multiple windows, game and editor) and push them as the current active state whenever needed.


public bool Debug { get; set; }

If true, we'll draw some debug information

public bool DebugHitboxes { get; set; }

If true we'll enable hitbox debugging

public SceneWorld World { get; set; }

The SceneWorld this instance is writing to. This world exists only for this instance. You need to add this world to your camera for it to render (!)

public Gizmo.Inputs Input

Input state. Should be setup before push.

public Gizmo.Inputs PreviousInput { get; }

The previous input state

public SelectionSystem Selection { get; set; }

This frame's created (or re-used) objects

public string ControlMode { get; set; }

The current control mode. This is generally implementation specific. We tend to use "mouse" and "firstperson".

public Gizmo.SceneSettings Settings { get; set; }

Some global settings accessible to the gizmos. Your implementation generally lets your users set up these things to their preference, and the gizmos should try to obey them.

public void StompCursorPosition( Vector2 position )

Set all of the state's cursor positions to this value. This stomps previous values which will effectively clear any deltas. This should be used prior to starting a loop.

public T GetValue( string name )

😔 No documentation found.

public void SetValue( string name, T value )

😔 No documentation found.

public Gizmo.Instance( )

😔 No documentation found.

public void Dispose( )

😔 No documentation found.

public IDisposable Push( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public void Clear( )

😔 No documentation found.