Instanceclass
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.
Constructors1
Showing 1 constructors
public Instance()
No results match this filter.
Methods6
Showing 6 methods
public void Clear()
Called when the scene changes and we don't want to inherit a bunch of values. We might want to just target some specific values here instead of clearing the log.
void—public virtual sealed void Dispose()
Destroy this instance, clean up any created resources/scene objects, destroy the world.
void—public T GetValue(string name)
Generic storage for whatever you want to do. You're responsible for not spamming into this and cleaning up after yourself.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
T—public System.IDisposable Push()
Push this instance as the global Gizmo state. All Gizmo calls during this scope will use this instance.
IDisposable—public void SetValue(string name, T value)
Generic storage for whatever you want to do. You're responsible for not spamming into this and cleaning up after yourself.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| value | T | — |
void—No results match this filter.
Properties7
Showing 7 properties
public string Sandbox.Gizmo.Instance.ControlMode { get; set; }
The current control mode. This is generally implementation specific. We tend to use "mouse" and "firstperson".
string—public bool Sandbox.Gizmo.Instance.Debug { get; set; }
If true, we'll draw some debug information
bool—public bool Sandbox.Gizmo.Instance.DebugHitboxes { get; set; }
If true we'll enable hitbox debugging
bool—public Sandbox.Gizmo.Inputs Sandbox.Gizmo.Instance.PreviousInput { get; set; }
The previous input state
public Sandbox.SelectionSystem Sandbox.Gizmo.Instance.Selection { get; set; }
This frame's created (or re-used) objects
public Sandbox.Gizmo.SceneSettings Sandbox.Gizmo.Instance.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 Sandbox.SceneWorld Sandbox.Gizmo.Instance.World { get; set; }
The world the gizmos are drawn into. Created on first use - every scene owns a gizmo instance, but most never draw a gizmo, so don't pay for a native world up front.
No results match this filter.