s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
Instance
chevron_left
Classes
class
Instance
search
Constructors
functions
Instance
Fields
crop_din
Input
Properties
data_object
ControlMode
data_object
Debug
data_object
DebugHitboxes
data_object
PreviousInput
data_object
Selection
data_object
Settings
data_object
World
Methods
functions
Clear
functions
Dispose
functions
GetValue
functions
Push
functions
SetValue
functions
StompCursorPosition
Instance
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.
class
Sandbox.Gizmo
.
Sandbox.Engine
build
Constructors
1
Instance
(
)
crop_din
Fields
1
Input
Inputs
Input state. Should be setup before push.
data_object
Properties
7
ControlMode
string
The current control mode. This is generally implementation specific. We tend to use "mouse" and "firstperson".
Debug
bool
If true, we'll draw some debug information
DebugHitboxes
bool
If true we'll enable hitbox debugging
PreviousInput
Inputs
The previous input state
Selection
SelectionSystem
This frame's created (or re-used) objects
Settings
SceneSettings
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.
World
SceneWorld
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 (!)
functions
Methods
6
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.
Dispose
(
)
Destroy this instance, clean up any created resources/scene objects, destroy the world.
GetValue
(
name
)
T
Generic storage for whatever you want to do. You're responsible for not spamming into this and cleaning up after yourself.
Push
(
)
IDisposable
Push this instance as the global Gizmo state. All Gizmo calls during this scope will use this instance.
SetValue
(
name
,
value
)
Generic storage for whatever you want to do. You're responsible for not spamming into this and cleaning up after yourself.
StompCursorPosition
(
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.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.