All pages
Powered by GitBook
1 of 1

Loading...

SGameObject

Functions

SubscribeToEvents

void SubscribeToEvents ()

Causes this script to start listening to events on the object.

This function is now automatically called by events that require it

SetSiblingIndex

void SetSiblingIndex (int newIndex)

Sets the sibling index.

Use this to change the sibling index of the GameObject. If a GameObject shares a parent with other GameObjects and are on the same level (i.e. they share the same direct parent), these GameObjects are known as siblings. The sibling index shows where each GameObject sits in this sibling hierarchy.

Use SetSiblingIndex to change the GameObject’s place in this hierarchy. When the sibling index of a GameObject is changed, its order in the Hierarchy window will also change.

Parameter
Type
Description

SetAsFirstSibling

void SetAsFirstSibling ()

This GameObject becomes the first Sibling

SetAsLastSibling

void SetAsLastSibling ()

This GameObject becomes the last Sibling

Duplicate

SGameObject Duplicate ()

Copies the object and returns a reference to the copy. Equivalent to calling Instantiate() in Unity

Instantiate

SGameObject Instantiate ()

Copy of Duplicate() for convenience

AddHingeJoint

AddHingeJoint ()

Adds a Hinge Joint component to this Game Object and returns its reference

AddLight

AddLight ()

Adds a Light component to the object.

AddAnimator

AddAnimator ()

Adds an Animator component to this Game Object and returns its reference

AddAudioSource

AddAudioSource ()

Adds an AudioSource component to the object.

AddClickable

AddClickable ()

Adds a Clickable component to the object.

GetScript

GetScript (string name)

Returns a Scripting Runtime component attached to this object by Component Name, or nil if none exist

Parameter
Type
Description

GetScriptsInChildren

List< > GetScriptsInChildren (string name, bool includeInactive=false)

Returns Scripting Runtime components attached to this object by Component Name or its children

Parameter
Type
Description

GetScriptInChildren

GetScriptInChildren (string name, bool includeInactive=false)

Returns a Scripting Runtime component attached to this object or its children by Component Name, or nil if none exist

Parameter
Type
Description

GetScriptInParent

GetScriptInParent (string name)

Returns a Scripting Runtime component attached to this object or its parents by Component Name, or nil if none exist

Parameter
Type
Description

GetEvents

GetEvents (string name)

Function Description

Parameter
Type
Description

GetAllEventsInChildren

List< > GetAllEventsInChildren (string name, bool includeInactive=false)

Function Description

Parameter
Type
Description

GetEventsInChildren

GetEventsInChildren (string name, bool includeInactive=false)

Function Description

Parameter
Type
Description

GetEventsInParent

GetEventsInParent (string name)

Function Description

Parameter
Type
Description

GetResources

GetResources (string name)

Function Description

Parameter
Type
Description

GetAllResourcesInChildren

List< > GetAllResourcesInChildren (string name, bool includeInactive=false)

Function Description

Parameter
Type
Description

GetResourcesInChildren

GetResourcesInChildren (string name, bool includeInactive=false)

Function Description

Parameter
Type
Description

GetResourcesInParent

GetResourcesInParent (string name)

Function Description

Parameter
Type
Description

GetData

GetData (string name)

Returns a Scripting Data component attached to this object by Component Name, or nil if none exist

Parameter
Type
Description

GetAllDataInChildren

List< > GetAllDataInChildren (string name, bool includeInactive=false)

Returns Scripting Data components attached to this object by Component Name or its children

Parameter
Type
Description

GetDataInChildren

GetDataInChildren (string name, bool includeInactive=false)

Returns a Scripting Data component attached to this object or its children by Component Name, or nil if none exist

Parameter
Type
Description

GetDataInParent

GetDataInParent (string name)

Returns a Scripting Data component attached to this object or its parents by Component Name, or nil if none exist

Parameter
Type
Description

AddRigidbody

AddRigidbody ()

Adds a Rigidbody component to the object.

AddNavMeshAgent

AddNavMeshAgent ()

Adds a NavMeshAgent component to the object.

AddSeat

AddSeat ()

Adds a Seat component to the object.

OnAwake

void OnAwake (Closure e)

Binds a event to the Awake() event.

Parameter
Type
Description

OnStart

void OnStart (Closure e)

Binds a event to the Start() event.

Parameter
Type
Description

OnEnable

void OnEnable (Closure e)

Binds a event to the OnEnable() event.

Parameter
Type
Description

OnDisable

void OnDisable (Closure e)

Binds a event to the OnDisable() event.

Parameter
Type
Description

OnFixedUpdate

void OnFixedUpdate (Closure e)

Binds a event to the OnFixedUpdate() event.

Parameter
Type
Description

OnLateUpdate

void OnLateUpdate (Closure e)

Binds a event to the OnLateUpdate() event.

Parameter
Type
Description

OnTriggerStart

void OnTriggerStart (Action< SGameObject > e) void OnTriggerStart (Closure e)

When a GameObject collides with another GameObject, Unity calls OnTriggerEnter.

OnTriggerEnter happens on the FixedUpdate function when two GameObjects collide. The Colliders involved are not always at the point of initial contact.

Note: Both GameObjects must contain a Collider component. One must have Collider.isTrigger enabled, and contain a Rigidbody. If both GameObjects have Collider.isTrigger enabled, no collision happens. The same applies when both GameObjects do not have a Rigidbody component.

Parameter
Type
Description

OnTriggerStay

void OnTriggerStay (Action< SGameObject > e) void OnTriggerStay (Closure e)

OnTriggerStay is called almost all the frames for every Collider other that is touching the trigger. The function is on the physics timer so it won't necessarily run every frame.

This message is sent to the trigger and the collider that touches the trigger. Note that trigger events are only sent if one of the colliders also has a rigidbody attached. Trigger events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions.

Parameter
Type
Description

OnTriggerExit

void OnTriggerExit (Action< SGameObject > e) void OnTriggerExit (Closure e)

OnTriggerExit is called when the Collider other has stopped touching the trigger.

This message is sent to the trigger and the Collider that touches the trigger. Notes: Trigger events are only sent if one of the Colliders also has a Rigidbody attached. Trigger events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions. OnTriggerExit occurs on the FixedUpdate after the Colliders have stopped touching. The Colliders involved are not guaranteed to be at the point of initial separation.

Parameter
Type
Description

OnCollisionEnter

void OnCollisionEnter (Action< SPhysicsHit > e) void OnCollisionEnter (Closure e)

OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.

In contrast to , OnCollisionEnter is passed the class and not a Collider (GameObject). The SPhysicsHit class contains information, for example, about contact points and impact velocity. Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions.

Parameter
Type
Description

OnCollisionStay

void OnCollisionStay (Action< > e) void OnCollisionStay (Closure e)

OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.

In contrast to , OnCollisionStay is passed the class and not a Collider (GameObject). The class contains information about contact points, impact velocity etc. If you don't use collisionInfo in the function, leave out the collisionInfo parameter as this avoids unneccessary calculations. Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions. Collision stay events are not sent for sleeping Rigidbodies.

Parameter
Type
Description

OnCollisionExit

void OnCollisionExit (Action< > e) void OnCollisionExit (Closure e)

OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.

In contrast to OnTriggerExit, OnCollisionExit is passed the SPhysicsHit class and not a Collider. The SPhysicsHit class contains information about contact points, impact velocity etc. If you don't use collisionInfo in the function, leave out the collisionInfo parameter as this avoids unneccessary calculations. Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions.

Parameter
Type
Description

OnParticleCollision

void OnParticleCollision (Action< SGameObject > e) void OnParticleCollision (Closure e)

OnParticleCollision is called when a particle hits a Collider.

This can be used to apply damage to a GameObject when hit by particles.

This message is sent to scripts attached to Particle Systems and to the Collider that was hit.

When OnParticleCollision is invoked from a script attached to a GameObject with a Collider, the GameObject parameter represents the ParticleSystem. The Collider receives at most one message per Particle System that collided with it in any given frame even when the Particle System struck the Collider with multiple particles in the current frame.

When OnParticleCollision is invoked from a script attached to a ParticleSystem, the GameObject parameter represents a GameObject with an attached Collider struck by the ParticleSystem. The ParticleSystem receives at most one message per Collider that is struck.

Messages are only sent if you enable Send Collision Messages in the Inspector of the Particle System Collision module.

The OnParticleCollision can be a co-routine. Simply use the yield statement in the function.

Parameter
Type
Description

OnParticleTrigger

void OnParticleTrigger (Closure e)

Binds a new event handler for the OnParticleTrigger event.

OnParticleTrigger event is called when any particles in a Particle System meet the conditions in the trigger module.

This can be used to kill or modify particles that are inside or outside a collision volume.

Parameter
Type
Description

OnUpdate

void OnUpdate (Closure e)

Binds a event to the OnUpdate() event.

Parameter
Type
Description

OnMouseDown

void OnMouseDown (Closure e)

Binds a event to the OnMouseDown() event.

Parameter
Type
Description

OnApplicationQuit

void OnApplicationQuit (Closure e)

Binds a new event handler for the On Application Quit event

Parameter
Type
Description

CompareTag

bool CompareTag (string tag)

Function Description

Parameter
Type
Description

SetParent

void SetParent (SGameObject other, bool worldPositionStays=true)

Make this GameObject the child of GameObject 'other'

Parameter
Type
Description

Find

SGameObject Find (string name)

Find and return a reference to GameObject with name 'name'

Parameter
Type
Description

FindInChildren

SGameObject FindInChildren (string name)

Find and return a reference to GameObject with name 'name' including children

Parameter
Type
Description

Destroy

void Destroy ()

Schedules this object for deletion at the end of the frame

GetComponent

SComponent GetComponent (string name)

Depreciated

Properties

Owner

long Owner get

Returns the GameObject's Owner

LocalID

int LocalID get

Returns the GameObject's Local ID

InventoryID

int InventoryID get

Return's the GameObject's InventoryID

HasStableID

bool HasStableID get

Returns true if GameObject has Stable ID

GlobalID

string? GlobalID get

Returns the global ID of the GameObject

Exists

bool Exists get

Does this object still exist in the scene (returns false if the object has been deleted via Destroy();)

HingeJoint

HingeJoint get

Returns a HingeJoint component attached to this object, or nil if none exist

Light

Light get

Returns a reference to a Light component on the object. Will return null if it does not exist.

ReflectionProbe

ReflectionProbe get

Returns a ReflectionProbe component attached to this object, or nil if none exist

LightInChild

LightInChildget

Returns a Light component attached to this object or its children, or nil if none exist

LightInParent

LightInParent get

Returns a Light component attached to this object or it's parent, or nil if none exist

Animator

Animator get

Returns a reference to a Animator component on the object. Will return null if it does not exist.

Animation

Animation get

Returns an Animation component attached to this object, or nil if none exist Animation is a legacy component and should not be confused with Animator

CanvasGroup

CanvasGroup get

Returns Canvas Group component attached to this object, or nil if none exist

Audio

Audio get

Returns a reference to a AudioSource component on the object. Will return null if it does not exist.

Floor

Floor get

Returns a RoomFloor component attached to this object, or nil if none exist

VoiceZone

VoiceZone get

Returns a VoiceZone component attached to this object, or nil if none exist

Browser

Browser get

Returns a reference to a BrowserSurface component on the object. Will return null if it does not exist.

Director

Director get

Returns a PlayableDirector component attached to this object, or nil if none exist

Renderer

Renderer get

Returns a reference to a Renderer component on the object. Will return null if it does not exist.

Vehicle

Vehicle get

Returns a Modular Vehicle component attached to this object, or nil if none exist

PostProcessVolume

PostProcessVolume get

Returns a Post Process Volume component attached to this object, or nil if none exist

Archimatix

SAXModel Archimatix get

Returns a Archimatix Model ("AXModel" component) - or Nil if nothing exists

Clickable

Clickable get

Returns a reference to a Clickable component on the object. Will return null if it does not exist.

EmbeddedVideo

EmbeddedVideo get

Returns an Embedded Video component attached to this object, or nil if none exist (may not work within editor)

Avatar

Avatar get

A reference to an Avatar component on the GameObject.

AvatarAppearance

AvatarAppearance get

Returns a AvatarAppearance component attached to this object, or nil if none exist

Script

Script get

Returns a Scripting Runtime component attached to this object, or nil if none exist

StateMachine

StateMachine get

Returns a State Machine component attached to this object, or nil if none exist

Networking

Networking get

Returns a Simple Networking component attached to this object, or nil if none exists

Events

Events get

Property Description

Resources

Resources get

Property Description

Data

Data get

Returns a Scripting Data component attached to this object, or nil if none exist

Rigidbody

Rigidbody get

Returns a reference to a Rigidbody component on the object. Will return null if it does not exist.

Collider

Collider get

Returns a reference to a Collider component on the object. Will return null if it does not exist.

BoxCollider

BoxCollider get

Returns a Box Collider component attached to this object, or nil if none exist

SphereCollider

SphereCollider get

Returns a Sphere Collider component attached to this object, or nil if none exist

CapsuleCollider

CapsuleCollider get

Returns a Capsule Collider component attached to this object, or nil if none exist

WheelCollider

WheelCollider get

Returns a WheelCollider component attached to this object, or nil if none exist

CharacterController

CharacterController get

Returns a Character Controller component attached to this object, or nil if none exist

AudioReactive

AudioReactive get

Returns the first Audio Reactive component attached to this object, or nil if none exist

AttachmentHelper

SAttachmentHelper AttachmentHelper get

Returns the first Attachment Helper component attached to this object, or nil if none exist

AudioReactiveAnimation

AudioReactiveAnimation get

Returns the first Audio Reactive Animation component attached to this object, or nil if none exist

AudioReactiveLight

AudioReactiveLight get

Returns the first Audio Reactive Light component attached to this object, or nil if none exist

AudioReactiveParticleSystem

AudioReactiveParticleSystem get

Returns the first Audio Reactive Particle System component attached to this object, or nil if none exist

AudioReactiveMaterial

AudioReactiveMaterial get

Returns the first Audio Reactive Material component attached to this object, or nil if none exist

AudioReactiveTransform

AudioReactiveTransform get

Returns the first Audio Reactive Transform component attached to this object, or nil if none exist

TrailRenderer

TrailRenderer get

Returns a Trail Renderer component attached to this object, or nil if none exist

LineRenderer

LineRenderer get

Returns a Line Renderer component attached to this object, or nil if none exist

UILayout

UILayout get

Returns a Renderer component attached to this object, or nil if none exist

UIToggle

UIToggle get

Returns a Unity uGUI Toggle component attached to this object, or nil if none exist

UIDropdown

UIDropdown get

Returns a Unity uGUI Dropdown component attached to this object, or nil if none exist

UIButton

UIButton get

Returns a Unity uGUI Dropdown component attached to this object, or nil if none exist

UIText

UIText get

Returns a reference to a UI.Text component on the object. Will return null if it does not exist.

UISlider

UISlider get

Returns a Unity uGUI Slider component attached to this object, or nil if none exist

UIScrollbar

UIScrollbar get

Returns a Unity uGUI Scrollbar component attached to this object, or nil if none exist

UICanvas

UICanvas get

Returns a Unity uGUI Canvas component attached to this object, or nil if none exist

UIImage

UIImage get

Returns a Unity uGUI Image component attached to this object, or nil if none exist

UIRawImage

UIRawImage get

Returns a Unity uGUI Text component attached to this object, or nil if none exist

UIInputField

UIInputField get

Returns a Unity uGUI Text component attached to this object, or nil if none exist

UIToolTipHint

UIToolTipHint get

Property Description

Camera

Camera get

Property Description

VirtualCamera

VirtualCamera get

Returns a VirtualCamera component attached to this object, or nil if none exists

Cloth

Cloth get

Returns a Cloth component attached to this object, or nil if none exists

MeshRenderer

MeshRenderer get

Returns a MeshRenderer component attached to this object, or nil if none exists

Furniture

Furniture get

Returns a Furniture component attached to this object, or nil if none exists

NavMeshAgent

NavMeshAgent get

Adds a NavMeshAgent component to the object.

NavMeshObstacle

NavMeshObstacle get

Returns a NavMeshObstacle component attached to this object, or nil if none exists

ParticleSystem

ParticleSystem get

Returns a ParticleSystem component attached to this object, or nil if none exists

RectTransform

RectTransform get

Returns a RectTransform component attached to this object, or nil if none exists

Seat

Seat get

Returns a reference to a Seat component on the object. Will return null if it does not exist.

SkinnedMeshRenderer

SkinnedMeshRenderer get

Returns a SkinnedMeshRenderer component attached to this object, or nil if none exists

Radio

Radio get

Returns a SceneBackgroundMusic component attached to this object, or nil if none exists

Terrain

Terrain get

Returns a Terrain component attached to this object, or nil if none exists

AnalyticsEvent

SAnalyticsEvent AnalyticsEvent get

Property Description

GraphicRaycaster

GraphicRaycaster get

Property Description

ContentSizeFitter

SContentSizeFitter ContentSizeFitter get

Property Description

Active

bool Active get set

Is this object Active in the scene

ActiveSelf

bool ActiveSelf get set

Returns true if GameObject is Active (even if it's parent is not active)

Layer

int Layer get set

Gets/Sets the object onto a particular layer (0-31)

Tag

string Tag get

Gets this objects Tag

Name

string Name get set

Gets/sets the name of this object

Moniker

string? Moniker get set

Property Description

Parent

Parent get set

Gets/sets the parent GameObject of this object. Assign nil/null to set this as the root.

Root

Root get

Gets the root of this object group - may be this object.

Children

[] Children get

Returns the list of direct children of this object.

WorldPosition

WorldPosition get set

Gets or sets the current position of this object relative to the scene

LocalPosition

LocalPosition get set

Gets or sets the current position of this object relative to the objects parent, taking into account local position/scale/rotation

WorldRotation

WorldRotation get set

Gets or sets the current rotation of this object relative to the scene

LocalRotation

LocalRotation get set

Gets or sets the current rotation of this object relative to the parent object

LocalScale

LocalScale get set

Gets or sets the current scale of this object relative to the parent

WorldScale

WorldScale get

Gets the current scale of this object relative to the scene

Forward

Forward get

Returns the forward direction vector of this game object (blue arrow)

Up

Up get

Returns the up direction vector of this game object (green arrow)

Right

Right get

Returns the right direction vector of this game object (red arrow)

EventCalendar

EventCalendar get

Returns an EventCalendar component attached to this object, or nil if none exists

name

string

SHingeJoint
SLight
SAnimator
SAudioSource
SClickable
SScriptingRuntime
SScriptingRuntime
SScriptingRuntime
SScriptingRuntime
SScriptingEvents
SScriptingEvents
SScriptingEvents
SScriptingEvents
SScriptingResources
SScriptingResources
SScriptingResources
SScriptingResources
SScriptingData
SScriptingData
SScriptingData
SScriptingData
SRigidbody
SNavMeshAgent
SSeat
OnTrigger
Start
SPhysicsHit
SPhysicsHit
OnTriggerStay
SPhysicsHit
SPhysicsHit
SPhysicsHit
SHingeJoint
SLight
SReflectionProbe
SLight
SLight
SAnimator
SAnimation
SCanvasGroup
SAudioSource
SRoomFloor
SVoiceZone
SBrowserSurface
SPlayableDirector
SRenderer
SModularVehicle
SPostProcessVolume
SClickable
SEmbeddedVideo
SAvatar
SAvatarAppearance
SScriptingRuntime
SStateMachine
SNetworking
SScriptingEvents
SScriptingResources
SScriptingData
SRigidbody
SCollider
SBoxCollider
SSphereCollider
SCapsuleCollider
SWheelCollider
SCharacterController
SAudioReactiveBase
SAudioReactiveAnimation
SAudioReactiveLight
SAudioReactiveParticleSystem
SAudioReactiveMaterial
SAudioReactiveTransform
STrailRenderer
SLineRenderer
SUILayout
SUIToggle
SUIDropdown
SUIButton
SUIText
SUISlider
SUIScrollbar
SUICanvas
SUIImage
SUIRawImage
SUIInputField
SUIToolTipHint
SCamera
SVirtualCamera
SCloth
SMeshRenderer
SFurniture
SNavMeshAgent
SNavMeshObstacle
SParticleSystem
SRectTransform
SSeat
SSkinnedMeshRenderer
SSceneBackgroundMusic
STerrain
SGraphicRaycaster
SGameObject
SGameObject
SGameObject
SVector
SVector
SQuaternion
SQuaternion
SVector
SVector
SVector
SVector
SVector
SEventCalendar
Space.Host.ExecutingObject.SubscribeToEvents()
Space.Host.ExecutingObject.SetSiblingIndex(2)
Space.Host.ExecutingObject.SetAsFirstSibling()
Space.Host.ExecutingObject.SetAsLastSibling()
local copy = Space.Host.ExecutingObject.Duplicate()
--this script will make this object, once clicked, duplicate itself, then the duplicate
--moves up and then duplicate itself again and the duplicate move down (total 3 vertically aligned)
--(Example: cells multiplying)


thisGameObject = Space.Host.ExecutingObject


OnClick = function()

local firstDuplicate = thisGameObject.Duplicate()
firstDuplicate.WorldPosition = firstDuplicate.WorldPosition + firstDuplicate.Up
local secondDuplicate = thisGameObject.Duplicate()
secondDuplicate.WorldPosition = secondDuplicate.WorldPosition - secondDuplicate.Up

end

thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip="Click to watch me multiply "
thisGameObject.Clickable.OnClick(OnClick)
NewGameObject = Space.Host.ExecutingObject.Instantiate()
--this script will make this object, once clicked, duplicate itself, then the duplicate
--moves up and then duplicate itself again and the duplicate move down (total 3 vertically aligned)
--(Example: cells multiplying)


thisGameObject = Space.Host.ExecutingObject


OnClick = function()

local firstDuplicate = thisGameObject.Instantiate()
firstDuplicate.WorldPosition = firstDuplicate.WorldPosition + firstDuplicate.Up
local secondDuplicate = thisGameObject.Instantiate()
secondDuplicate.WorldPosition = secondDuplicate.WorldPosition - secondDuplicate.Up

end

thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip="Click to watch me multiply "
thisGameObject.Clickable.OnClick(OnClick) 
NewHingeJoint = Space.Host.ExecutingObject.AddHingeJoint()
--clicking this object will add a Hinge Joint component to it at runtime

thisObject = Space.Host.ExecutingObject


OnClick = function()
HJ = thisObject.AddHingeJoint()
end



thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
newLightComponent = Space.Host.ExecutingObject.AddLight()
NewAnimator = Space.Host.ExecutingObject.AddAnimator()
--clicking this object will add an animator to it and controller at runtime

thisObject = Space.Host.ExecutingObject
theResource = Space.GetResource("An Animator Controller") -- add controller to resources in Scripting Runtime


OnClick = function()
Animator = thisObject.AddAnimator()  
Animator.Controller = theResource
end



thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
newAudioSourceComponent = Space.Host.ExecutingObject.AddAudioSource()
newClikcableComponent = Space.Host.ExecutingObject.AddClickable()
scriptingRuntime = Space.Host.ExecutingObject.GetScript("scriptingruntimecomponentname")
tableScriptsInChildren = Space.Host.ExecutingObject.GetScriptsInChildren("scriptingruntimecomponentname",true)
scriptingRuntimeInChildren = Space.Host.ExecutingObject.GetScriptInChildren("scriptingruntimecomponentname",true)
scriptingRuntimeInParent = Space.Host.ExecutingObject.GetScript("scriptingruntimecomponentname")
scriptingEvent = Space.Host.ExecutingObject.GetEvents('ScriptingEventsComponentName')
tableScriptingEvent = Space.Host.ExecutingObject.GetAllEventsInChildren
scriptingEvent = Space.Host.ExecutingObject.GetEventsInChildren('ScriptingEventsComponentName')
--or
scriptingEvent = Space.Host.ExecutingObject.GetEventsInChildren('ScriptingEventsComponentName', true)
scriptingEvent = Space.Host.ExecutingObject.GetEventsInParent('ScriptingEventsComponentName')
Space.Host.ExecutingObject.GetResources('ResourcesComponentName')
tableScriptingResources = Space.Host.ExecutingObject.GetAllResourcesInChildren('ScriptingResourcesComponentName')
--or
tableScriptingResources = Space.Host.ExecutingObject.GetAllResourcesInChildren('ScriptingResourcesComponentName', true)
tableScriptingResources = Space.Host.ExecutingObject.GetResourcesInChildren('ScriptingResourcesComponentName')
--or
tableScriptingResources = Space.Host.ExecutingObject.GetResourcesInChildren('ScriptingResourcesComponentName', true)
tableScriptingResources = Space.Host.ExecutingObject.GetResourcesInParent('ScriptingResourcesComponentName')
scriptingData = Space.Host.ExecutingObject.GetData("scriptingdatacomponentname")
tableScriptingDataInChildren = Space.Host.ExecutingObject.GetAllDataInChildren("scriptingdatacomponentname",true)
scriptingDataInChildren = Space.Host.ExecutingObject.GetDataInChildren("scriptingdatacomponentname",true)
scriptingDataInParent = Space.Host.ExecutingObject.GetDataInParent("scriptingdatacomponentname")
newRigibodyComponent = Space.Host.ExecutingObject.AddRigidbody()
newNavMeshAgentComponent =  Space.Host.ExecutingObject.AddNavMeshAgent()
newSeatComponent = Space.Host.ExecutingObject.AddSeat()
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnAwake(F)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnStart(F)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnEnable(F)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnDisable(F)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnFixedUpdate(F)
--this script will make this object move forward each physics frame
thisObject = Space.Host.ExecutingObject

OnFixedUpdate = function()
  
  thisObject.WorldPosition = thisObject.WorldPosition + (thisObject.Forward * 0.01 )
--unlike OnUpdate we did not multiply by Space.DeltaTime 
--because OnFixedUpdate executes at the same rate regardless
end


thisObject.OnFixedUpdate(OnFixedUpdate)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnLateUpdate(F)
--this script will make this object move forward each frame
--but it will be last to move among other objects (read about OnLateUpdate)
--(example: camera movement)
thisObject = Space.Host.ExecutingObject

OnLateUpdate = function()
  
  thisObject.WorldPosition = thisObject.WorldPosition + (thisObject.Forward * 0.01 * Space.DeltaTime)
--we multipy by Space.DeltaTime so that it behaves the same for all players
--even though they have different FPS (frames per second)
end


thisObject.OnLateUpdate(OnLateUpdate)
this = Space.Host.ExecutingObject

OnTriggerStart  = function(SGameObject)
 Space.Log("Trigger Start")
end

this.OnTriggerStart (OnTriggerStart )
 --the below scipt makes this object a boundary area where flying gets blocked
--while player is in it and flying is allowed once player leaves it
--(Example: No fly zone)
--[This object's collider needs to be set as IsTrigger (Please read about OnTriggerStart for troubleshooting)]

thisGameObject = Space.Host.ExecutingObject

OnTriggerStart = function(TriggerStarter)
  if TriggerStarter.Root.Avatar ~= nil then
    if TriggerStarter.Root.Avatar.Username == Space.Scene.PlayerAvatar.Username then
      Space.Scene.PlayerAvatar.BlockFly = true
    end
  end
end


OnTriggerExit = function(TriggerExiter)
  if TriggerExiter.Root.Avatar ~= nil then
    if TriggerExiter.Root.Avatar.Username == Space.Scene.PlayerAvatar.Username then
      Space.Scene.PlayerAvatar.BlockFly = false
    end
  end
end

thisGameObject.OnTriggerStart(OnTriggerStart)
thisGameObject.OnTriggerExit(OnTriggerExit) 
this = Space.Host.ExecutingObject

OnTriggerStay  = function(SGameObject)
 Space.Log("Trigger Stay")
end

this.OnTriggerStay(OnTriggerStay)
--the below scipt makes this object a boundary area where any user entering it
--will be blocked from movement for 10 seconds, then the object will release controls and
--destry itself after that
--(Example: freezing trap)
--[This object's collider needs to be set as IsTrigger (Please read about OnTriggerStart for troubleshooting)]

thisGameObject = Space.Host.ExecutingObject
FrozenTime = 0.0

OnTriggerStart = function(TriggerStarter)
  if TriggerStarter.Root.Avatar ~= nil then
    if TriggerStarter.Root.Avatar.Username == Space.Scene.PlayerAvatar.Username then
      Space.Scene.PlayerAvatar.BlockMovement = true
    end
  end
end

OnTriggerStay = function(TriggerStayer)
  if TriggerStayer.Root.Avatar ~= nil then
    if TriggerStayer.Root.Avatar.Username == Space.Scene.PlayerAvatar.Username then
      FrozenTime = FrozenTime + Space.DeltaTime
        if FrozenTime > 20 then
        Space.Scene.PlayerAvatar.BlockMovement = false
        thisGameObject.Destroy()
        end
    end
  end
end

thisGameObject.OnTriggerStart(OnTriggerStart)
thisGameObject.OnTriggerStay(OnTriggerStay)
this = Space.Host.ExecutingObject

OnTriggerExit  = function(SGameObject)
 Space.Log("Trigger Stay")
end

this.OnTriggerExit(OnTriggerExit)
--the below scipt makes this object a boundary area where flying gets blocked
--while player is in it and flying is allowed once player leaves it
--(Example: No fly zone)
--[This object's collider needs to be set as IsTrigger (Please read about OnTriggerStart for troubleshooting)]

thisGameObject = Space.Host.ExecutingObject

OnTriggerStart = function(TriggerStarter)
  if TriggerStarter.Root.Avatar ~= nil then
    if TriggerStarter.Root.Avatar.Username == Space.Scene.PlayerAvatar.Username then
      Space.Scene.PlayerAvatar.BlockFly = true
    end
  end
end


OnTriggerExit = function(TriggerExiter)
  if TriggerExiter.Root.Avatar ~= nil then
    if TriggerExiter.Root.Avatar.Username == Space.Scene.PlayerAvatar.Username then
      Space.Scene.PlayerAvatar.BlockFly = false
    end
  end
end

thisGameObject.OnTriggerStart(OnTriggerStart)
thisGameObject.OnTriggerExit(OnTriggerExit)
this = Space.Host.ExecutingObject

OnCollisionEnter = function(SPhysicsHit)
 Space.Log("Collision Enter")
end

this.OnCollisionEnter(OnCollisionEnter)
 --this script will make this object delete itself if it collides with something
--(Example: grenade)
--[Make sure you add a rigibody to this object (read above about "collisions")


thisGameObject = Space.Host.ExecutingObject


OnCollisionEnter = function(SPhysicsHit)
 thisGameObject.Destroy()
end

thisGameObject.OnCollisionEnter(OnCollisionEnter) 
this = Space.Host.ExecutingObject

OnCollisionStay = function(SPhysicsHit)
 Space.Log("Collision Stay")
end

this.OnCollisionStay(OnCollisionStay)
  --this script will make this object delete itself if
 --it is being touched for around 10 seconds
--(Example: a flag being captured)
--[Make sure this object has collider/rigidbody (read above about "collisions" for troubleshooting)]


thisGameObject = Space.Host.ExecutingObject
touchedTime = 0.0

OnCollisionStay = function(SPhysicsHit)
  touchedTime = touchedTime + Space.DeltaTime
    if touchedTime > 25 then
   thisGameObject.Destroy()
   end
end

thisGameObject.OnCollisionStay(OnCollisionStay)  
this = Space.Host.ExecutingObject

OnCollisionExit = function(SPhysicsHit)
 Space.Log("Collision Exit")
end

this.OnCollisionExit(OnCollisionExit)
--this script will make this object destroy itself when an object 
--that collided with it exits the collission
--(Example: landmine)
--[Make sure you add a rigibody to this object (read above about "collisions")


thisGameObject = Space.Host.ExecutingObject


OnCollisionExit = function(SPhysicsHit)
 thisGameObject.Destroy()
end

thisGameObject.OnCollisionExit(OnCollisionExit)
this = Space.Host.ExecutingObject

OnParticleCollision = function(GameObject)
 Space.Log("Particle Collision")
end

this.OnParticleCollision(OnParticleCollision)
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 Space.Log("Particle Trigger Event")
end

this.OnParticleTrigger(OnParticleTrigger)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnUpdate(F)
--this script will make this object move forward each frame
thisObject = Space.Host.ExecutingObject

OnUpdate = function()
  
  thisObject.WorldPosition = thisObject.WorldPosition + (thisObject.Forward * 0.01 * Space.DeltaTime)
--we multipy by Space.DeltaTime so that it behaves the same for all players
--even though they have different FPS (frames per second)
end


thisObject.OnUpdate(OnUpdate)
function F()
Space.Log("bound")
end
Space.Host.ExecutingObject.OnMouseDown(F)
this = Space.Host.ExecutingObject

OnApplicationQuit = function()
 Space.Log("Application Quit")
end

this.OnApplicationQuit(OnApplicationQuit)
isSame = Space.Host.ExecutingObject.CompareTag('tagname')
Space.Host.ExecutingObject.SetParent(otherObjectReference,true)
--this script will set your avatar's "right hand" as parent of this object
--this way this object will be a child of your right hand and therefore move with it
--(Example: clicking on a gun to equip it)


thisGameObject = Space.Host.ExecutingObject

OnClick = function()

RightHand = Space.Scene.PlayerAvatar.FindBone("RightHand")
thisGameObject.SetParent(RightHand)
thisGameObject.LocalPosition = Vector.New(0,0,0) -- resetting position to match hand

end

thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip="Click to Equip "
thisGameObject.Clickable.OnClick(OnClick)
FoundObject = Space.Host.ExecutingObject.Find("GameObject Name")
FoundObjectInChildren = Space.Host.ExecutingObject.FindInChildren("GameObject Name")
Space.Host.ExecutingObject.Destroy()
Owner = Space.Host.ExecutingObject.Owner
LocalID = Space.Host.ExecutingObject.LocalID
InventoryID = Space.Host.ExecutingObject.InventoryID
HasStableID = Space.Host.ExecutingObject.HasStableID
GlobalID = Space.Host.ExecutingObject.GlobalID
doesExist = Space.Host.ExecutingObject.Exists
HingeJoint = Space.Host.ExecutingObject.HingeJoint
newLightComponent = Space.Host.ExecutingObject.Light
ReflectionProbe = Space.Host.ExecutingObject.ReflectionProbe
LightInChild = Space.Host.ExecutingObject.LightInChild
LightInParent = Space.Host.ExecutingObject.LightInParent
animatorComponent = Space.Host.ExecutingObject.Animator
Animation = Space.Host.ExecutingObject.Animation
CanvasGroup = Space.Host.ExecutingObject.CanvasGroup
newAudioComponent = Space.Host.ExecutingObject.Audio
Floor = Space.Host.ExecutingObject.Floor
VoiceZone = Space.Host.ExecutingObject.VoiceZone
newBrowserComponent = Space.Host.ExecutingObject.Browser
Director = Space.Host.ExecutingObject.Director
renderer = Space.Host.ExecutingObject.Renderer
Vehicle = Space.Host.ExecutingObject.Vehicle
PostProcessVolume = Space.Host.ExecutingObject.PostProcessVolume
Archimatix = Space.Host.ExecutingObject.Archimatix
clickableComponent = Space.Host.ExecutingObject.Clickable
EmbeddedVideo = Space.Host.ExecutingObject.EmbeddedVideo
Avatar = Space.Host.ExecutingObject.Avatar
AvatarAppearance = Space.Host.ExecutingObject.AvatarAppearance
Script = Space.Host.ExecutingObject.Script
StateMachine = Space.Host.ExecutingObject.StateMachine
SimpleNetworking = Space.Host.ExecutingObject.Networking
eventsComponent = Space.Host.ExecutingObject.Events
resourcesComponent = Space.Host.ExecutingObject.Resources
Data = Space.Host.ExecutingObject.Data
rigidbodyComponent = Space.Host.ExecutingObject.Rigidbody
colliderComponent =  Space.Host.ExecutingObject.Collider
BoxCollider = Space.Host.ExecutingObject.BoxCollider
SphereCollider = Space.Host.ExecutingObject.SphereCollider
CapsuleCollider = Space.Host.ExecutingObject.CapsuleCollider
WheelCollider = Space.Host.ExecutingObject.WheelCollider
CharacterController = Space.Host.ExecutingObject.CharacterController
AudioReactive = Space.Host.ExecutingObject.AudioReactive
AttachmentHelper = Space.Host.ExecutingObject.AttachmentHelper
AudioReactiveAnimation = Space.Host.ExecutingObject.AudioReactiveAnimation
AudioReactiveLight = Space.Host.ExecutingObject.AudioReactiveLight
AudioReactiveParticleSystem = Space.Host.ExecutingObject.AudioReactiveParticleSystem
AudioReactiveMaterial = Space.Host.ExecutingObject.AudioReactiveMaterial
AudioReactiveTransform = Space.Host.ExecutingObject.AudioReactiveTransform
TrailRenderer = Space.Host.ExecutingObject.TrailRenderer
LineRenderer = Space.Host.ExecutingObject.LineRenderer
UILayout = Space.Host.ExecutingObject.UILayout
UIToggle = Space.Host.ExecutingObject.UIToggle
UIDropdown = Space.Host.ExecutingObject.UIDropdown
UIButton = Space.Host.ExecutingObject.UIButton
uitext = Space.Host.ExecutingObject.UIText 
UISlider = Space.Host.ExecutingObject.UISlider
UIScrollbar = Space.Host.ExecutingObject.UIScrollbar
UICanvas = Space.Host.ExecutingObject.UICanvas
UIImage = Space.Host.ExecutingObject.UIImage
UIRawImage = Space.Host.ExecutingObject.UIRawImage
UIInputField = Space.Host.ExecutingObject.UIInputField
tooltipHint = Space.Host.ExecutingObject.UIToolTipHint
camera = Space.Host.ExecutingObject.Camera
VirtualCamera = Space.Host.ExecutingObject.VirtualCamera
Cloth = Space.Host.ExecutingObject.Cloth
MeshRenderer = Space.Host.ExecutingObject.MeshRenderer
Furniture = Space.Host.ExecutingObject.Furniture
navMeshAgent = Space.Host.ExecutingObject.AddNavMeshAgent()
NavMeshObstacle = Space.Host.ExecutingObject.NavMeshObstacle
ParticleSystem = Space.Host.ExecutingObject.ParticleSystem
RectTransform = Space.Host.ExecutingObject.RectTransform
seatComponent = Space.Host.ExecutingObject.AddSeat()
SkinnedMeshRenderer = Space.Host.ExecutingObject.SkinnedMeshRenderer
Radio = Space.Host.ExecutingObject.Radio
Terrain = Space.Host.ExecutingObject.Terrain
analyticsEvent = Space.Host.ExecutingObject.AnalyticsEvent
graphicRaycaster = Space.Host.ExecutingObject.GraphicRaycaster
contentSzeFitter = Space.Host.ExecutingObject.ContentSizeFitter
Space.Host.ExecutingObject.Active = false
--the below script will make this object become inactive
--after being being clicked
--(Example: picking up fruits)

thisGameObject = Space.Host.ExecutingObject


OnClick = function()
thisGameObject.Active = false
end

thisGameObject.AddClickable()
thisGameObject.Clickable.Tooltip="Pick me!"
thisGameObject.Clickable.OnClick(OnClick)
 Space.Host.ExecutingObject.ActiveSelf = false
Space.Host.ExecutingObject.Layer = 21
objectTag = Space.Host.ExecutingObject.Tag
Space.Host.ExecutingObject.Name = 'Hello World!'
Space.Host.ExecutingObject.Moniker = 'New  Moniker'
Space.Host.ExecutingObject.Parent = Space.Host.GetReference("TheOtherObject")
objectRoot = Space.Host.ExecutingObject.Root
tableChildren = Space.Host.ExecutingObject.Children
Space.Host.ExecutingObject.WorldPosition = Vector.New(1,1,1)
Space.Host.ExecutingObject.LocalPosition = Vector.New(1,1,1)
Space.Host.ExecutingObject.WorldRotation = Quaternion.Euler(0,180,0)
Space.Host.ExecutingObject.LocalRotation = Quaternion.Euler(0,180,0)
Space.Host.ExecutingObject.LocalScale = Vector.New(2,2,2)
worldScale = Space.Host.ExecutingObject.WorldScale 
vectorForward = Space.Host.ExecutingObject.Forward
vectorUp = Space.Host.ExecutingObject.Up
vectorRight = Space.Host.ExecutingObject.Right
EventCalendar = Space.Host.ExecutingObject.EventCalendar