build Constructors 1

data_object Properties 29

Active
bool
True if this Component is enabled, and all of its ancestor GameObjects are enabled
Components
ComponentList
Access components on this component's GameObject
ComponentVersion
int
The version of the component. Used by Sandbox.JsonUpgrader.
DebugOverlay
DebugOverlaySystem
Allows drawing of temporary debug shapes and text in the scene
Enabled
bool
The enable state of this Sandbox.Component. This doesn't tell you whether the component is actually active because its parent Sandbox.GameObject might be disabled. This merely tells you what the component wants to be. You should use Sandbox.Component.Active to determine whether the object is truly active in the scene.
Flags
ComponentFlags
GameObject
GameObject
The GameObject this component belongs to.
Id
Guid
IsProxy
bool
True if this is a networked object and is owned by another client. This means that we're not controlling this object, so shouldn't try to move it or anything.
IsValid
bool
LocalPosition
Vector3
The local position of the game object.
LocalRotation
Rotation
The local rotation of the game object.
LocalScale
Vector3
The local scale of the game object.
LocalTransform
Transform
The local transform of the game object.
Network
NetworkAccessor
OnComponentDestroy
Action
OnComponentDisabled
Action
OnComponentEnabled
Action
OnComponentFixedUpdate
Action
OnComponentStart
Action
OnComponentUpdate
Action
Scene
Scene
The scene this Component is in. This is a shortcut for `GameObject.Scene`.
Tags
ITagSet
Task
TaskSource
Allow creating tasks that are automatically cancelled when the GameObject is destroyed.
Transform
GameTransform
The transform of the GameObject this component belongs to. Components don't have their own transforms but they can access the transform of the GameObject they belong to. This is a shortcut for `GameObject.Transform`.
WorldPosition
Vector3
The world position of the game object.
WorldRotation
Rotation
The world rotation of the game object.
WorldScale
Vector3
The world scale of the game object.
WorldTransform
Transform
The world transform of the game object.

functions Methods 40

__rpc_Wrapper (m, argument)
__sync_GetValue (p)
T
__sync_SetValue (p)
AddComponent (startEnabled)
T
Add a component to this GameObject
Deserialize (node)
DeserializeImmediately (node)
Deserialize this component as per Sandbox.Component.Deserialize(System.Text.Json.Nodes.JsonObject) but update Sandbox.Component.GameObject and Sandbox.Component property references immediately instead of having them deferred.
Destroy ()
Destroy this component, if it isn't already destroyed. The component will be removed from its GameObject and will stop existing. You should avoid interating with the component after calling this.
DestroyGameObject ()
Destroy the parent GameObject. This really only exists so when you're typing Destroy you realise that calling Destroy only destroys the Component - not the whole GameObject.
DrawGizmos ()
Called in the editor to draw things like bounding boxes etc
EditLog (name, source)
obsolete
Called when something on the component has been edited
GetComponent (includeDisabled)
T
Get a component on this GameObject
GetComponentInChildren (includeDisabled, includeSelf)
T
Get component on this GameObject or on descendant GameObjects
GetComponentInParent (includeDisabled, includeSelf)
T
Get component on this GameObject and on ancestor GameObjects
GetComponents (includeDisabled)
IEnumerable`1
Get components on this GameObject
GetComponentsInChildren (includeDisabled, includeSelf)
IEnumerable`1
Get components on this GameObject and on descendant GameObjects
GetComponentsInParent (includeDisabled, includeSelf)
IEnumerable`1
Get components on this GameObject and on ancestor GameObjects
GetOrAddComponent (startEnabled)
T
Add a component to this GameObject
Invoke (secondsDelay, action, ct)
Invoke a method in x seconds. Won't be invoked if the component is no longer active.
IsRunning (doo)
bool
Returns true if the given Doo is currently running on this component.
OnAwake ()
Called once per component
OnDestroy ()
Called once, when the component or gameobject is destroyed
OnDirty ()
obsolete
Called when the component has become dirty
OnDisabled ()
OnEnabled ()
Called after Awake or whenever the component switches to being enabled (because a gameobject hierarchy active change, or the component changed)
OnFixedUpdate ()
When enabled, called on a fixed interval that is determined by the Scene. This is also the fixed interval in which the physics are ticked. Time.Delta is that fixed interval.
OnLoad ()
Task
OnParentChanged (oldParent, newParent)
The parent has changed from one parent to another
OnParentDestroy ()
The parent object is being destroyed. This is a nice place to switch to a healthier parent.
OnPreRender ()
When enabled, called every frame, does not get called on a dedicated server
OnPropertyDirty (p)
obsolete
OnRefresh ()
Called immediately after being refreshed from a network snapshot.
OnStart ()
Called once before the first Update - when enabled.
OnTagsChanged ()
When tags have been updated
OnUpdate ()
When enabled, called every frame
OnValidate ()
Called immediately after deserializing, and when a property is changed in the editor.
Reset ()
Run (doo, c)
Serialize (options)
JsonNode
Stop (doo)
Stop a specific Doo, if it's running
StopAll ()
Stop all running Doos

Inheritance

Component
AmbientLight
AudioListener
BaseChair
BasePostProcess
BaseSoundComponent
BeamEffect
Button
CableComponent
CableNodeComponent
CameraComponent
CharacterController
CitizenAnimationHelper
ClutterComponent
Collider
CubemapFog
Decal
Door
Dresser
EnvmapProbe
FireDamage
GradientFog
HammerMesh
HighlightOutline
IndirectLightVolume
Joint
LegacyParticleSystem
Light
LipSync
ManualHitbox
MapInstance
MapObjectComponent
MapSkybox3D
MissingComponent
ModelHitboxes
ModelPhysics
MoveMode
MoviePlayer
NavMeshAgent
NavMeshLink
NetworkHelper
PanelComponent
ParticleController
ParticleEffect
ParticleEmitter
PhysicsFilter
PlayerController
PostProcess
Prop
RadiusDamage
Renderer
Rigidbody
SceneInformation
ScreenPanel
SkyBox2D
SoundscapeTrigger
SpawnPoint
TemporaryEffect
TransformProxyComponent
TriggerHurt
VerletRope
Voice
VolumeComponent
VolumetricFogController
VolumetricFogVolume
VRAnchor
VRHand
VRModelRenderer
VRTrackedObject
WorldInput
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.