Line 369: | Line 369: | ||
--(Example: Shooting a bullet to your front) | --(Example: Shooting a bullet to your front) | ||
--<Note: We multiplied .Forward by Space.DeltaTime to achieve movement per second not per frame> | --<Note: We multiplied .Forward by Space.DeltaTime to achieve movement per second not per frame> | ||
+ | --<Note: If you want to go backwards you can just minus from the WorldPosition instead of add> | ||
thisGameObject = Space.Host.ExecutingObject | thisGameObject = Space.Host.ExecutingObject | ||
Line 398: | Line 399: | ||
obj.WorldRotation = Quaternion.Euler(0,0,90);<br> | obj.WorldRotation = Quaternion.Euler(0,0,90);<br> | ||
Space.Log(obj.Right);<br> | Space.Log(obj.Right);<br> | ||
− | ''-- prints "[0,1,0]" to the console - now it points in the direction the Up directional vector was pointing in.''}} | + | ''-- prints "[0,1,0]" to the console - now it points in the direction the Up directional vector was pointing in.''|6=<pre>--the below script will make this object keep moving to it's Right |
+ | --(Example: Shooting a bullet to your right) | ||
+ | --<Note: We multiplied .Right by Space.DeltaTime to achieve movement per second not per frame> | ||
+ | --<Note: If you want to go left you can just minus from the WorldPosition instead of add> | ||
+ | |||
+ | thisGameObject = Space.Host.ExecutingObject | ||
+ | SPEED = 1 | ||
+ | |||
+ | OnUpdate = function() | ||
+ | thisGameObject.WorldPosition = thisGameObject.WorldPosition + (thisGameObject.Right * Space.DeltaTime * SPEED) | ||
+ | end | ||
+ | |||
+ | thisGameObject.SubscribeToEvents() | ||
+ | thisGameObject.OnUpdate(OnUpdate)</pre>}} | ||
The SGameObject class refers a single Game Object active within the scene.
Copies the object and returns a reference to the copy. Equivalent to calling Instantiate() in Unity
Schedules this object for deletion at the end of the frame
Adds a Light component to the object.
-- add the Light component to the object if there is none
if obj.Light == null then
end
Space.Log(obj.Light);
Adds an AudioSource component to the object.
-- add the AudioSource component to the object if there is none
if obj.Audio == null then
end
Space.Log(obj.Audio);
Adds a Clickable component to the object.
-- add the Clickable component to the object if there is none
if obj.Clickable == null then
end
Space.Log(obj.Clickable);
Adds a Rigidbody component to the object.
-- add the Rigidbody component to the object if there is none
if obj.Rigidbody == null then
end
Space.Log(obj.Rigidbody);
Adds a NavMeshAgent component to the object.
-- add the NavMeshAgent component to the object if there is none
if obj.NavMeshAgent == null then
end
Space.Log(obj.NavMeshAgent);
Adds a Seat component to the object.
-- add the Seat component to the object if there is none
if obj.Seat == null then
end
Space.Log(obj.Seat);
Causes this script to start listening to events on the object. Only use if you need to.
Space.Host.ExecutingObject.SubscribeToEvents()
Binds a event to the Awake() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnAwake(F)
Binds a event to the Start() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnStart(F)
Binds a event to the OnEnable() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnEnable(F)
Binds a event to the OnDisable() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnDisable(F)
Binds a event to the OnFixedUpdate() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnFixedUpdate(F)
Binds a event to the OnLateUpdate() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnLateUpdate(F)
Binds a event to the OnUpdate() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnUpdate(F)
Binds a event to the OnMouseDown() event. Requires SubscribeToEvents be called first.
function F() Space.Log("bound") end Space.Host.ExecutingObject.SubscribeToEvents() Space.Host.ExecutingObject.OnMouseDown(F)
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.
Space.Host.ExecutingObject.SetSiblingIndex(2)
This GameObject becomes the first Sibling
Space.Host.ExecutingObject.SetAsFirstSibling()
This GameObject becomes the last Sibling
Space.Host.ExecutingObject.SetAsLastSibling()
Copy of Duplicate() for convenience
NewGameObject = Space.Host.ExecutingObject.Instantiate()
Adds a Hinge Joint component to this Game Object and returns its reference
NewHingeJoint = Space.Host.ExecutingObject.AddHingeJoint()
Adds an Animator component to this Game Object and returns its reference
NewAnimator = Space.Host.ExecutingObject.AddAnimator()
Returns a Scripting Runtime component attached to this object by Component Name, or nil if none exist
scriptingRuntime = Space.Host.ExecutingObject.GetScript("scriptingruntimecomponentname")
Returns Scripting Runtime components attached to this object by Component Name or its children
tableScriptsInChildren = Space.Host.ExecutingObject.GetScriptsInChildren("scriptingruntimecomponentname",true)
Returns a Scripting Runtime component attached to this object or its children by Component Name, or nil if none exist
scriptingRuntimeInChildren = Space.Host.ExecutingObject.GetScriptInChildren("scriptingruntimecomponentname",true)
Returns a Scripting Runtime component attached to this object or its parents by Component Name, or nil if none exist
scriptingRuntimeInParent = Space.Host.ExecutingObject.GetScript("scriptingruntimecomponentname")
Returns a Scripting Data component attached to this object by Component Name, or nil if none exist
scriptingData = Space.Host.ExecutingObject.GetData("scriptingdatacomponentname")
Returns Scripting Data components attached to this object by Component Name or its children
tableScriptingDataInChildren = Space.Host.ExecutingObject.GetAllDataInChildren("scriptingdatacomponentname",true)
Returns a Scripting Data component attached to this object or its children by Component Name, or nil if none exist
scriptingDataInChildren = Space.Host.ExecutingObject.GetDataInChildren("scriptingdatacomponentname",true)
Returns a Scripting Data component attached to this object or its parents by Component Name, or nil if none exist
scriptingDataInParent = Space.Host.ExecutingObject.GetDataInParent("scriptingdatacomponentname")
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.
this = Space.Host.ExecutingObject OnTriggerStart = function(SGameObject) Space.Log("Trigger Start") end this.SubscribeToEvents() this.OnTriggerStart (OnTriggerStart )
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.
this = Space.Host.ExecutingObject OnTriggerStay = function(SGameObject) Space.Log("Trigger Stay") end this.SubscribeToEvents() this.OnTriggerStay(OnTriggerStay)
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.
this = Space.Host.ExecutingObject OnTriggerExit = function(SGameObject) Space.Log("Trigger Stay") end this.SubscribeToEvents() this.OnTriggerExit(OnTriggerExit)
OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
In contrast to OnTriggerEnter, OnCollisionEnter is passed the SPhysicsHit 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.
this = Space.Host.ExecutingObject OnCollisionEnter = function(SPhysicsHit) Space.Log("Collision Enter") end this.SubscribeToEvents() this.OnCollisionEnter(OnCollisionEnter)
OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.
In contrast to OnTriggerStay, OnCollisionStay is passed the SPhysicsHit class and not a Collider (GameObject). 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. Collision stay events are not sent for sleeping Rigidbodies.
this = Space.Host.ExecutingObject OnCollisionStay = function(SPhysicsHit) Space.Log("Collision Stay") end this.SubscribeToEvents() this.OnCollisionStay(OnCollisionStay)
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.
this = Space.Host.ExecutingObject OnCollisionExit = function(SPhysicsHit) Space.Log("Collision Exit") end this.SubscribeToEvents() this.OnCollisionExit(OnCollisionExit)
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.
this = Space.Host.ExecutingObject OnParticleCollision = function(GameObject) Space.Log("Particle Collision") end this.SubscribeToEvents() this.OnParticleCollision(OnParticleCollision)
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.
this = Space.Host.ExecutingObject OnParticleTrigger = function(GameObject) Space.Log("Particle Trigger Event") end this.SubscribeToEvents() this.OnParticleTrigger(OnParticleTrigger)
Binds a new event handler for the On Application Quit event
this = Space.Host.ExecutingObject OnApplicationQuit = function() Space.Log("Application Quit") end this.SubscribeToEvents() this.OnApplicationQuit(OnApplicationQuit)
Make this GameObject the child of GameObject 'other'
Space.Host.ExecutingObject.SetParent(otherObjectReference,true)
Find and return a reference to GameObject with name 'name'
FoundObject = Space.Host.ExecutingObject.Find("GameObject Name")
Find and return a reference to GameObject with name 'name' including children
FoundObjectInChildren = Space.Host.ExecutingObject.FindInChildren("GameObject Name")
Return a reference to component with component name 'name' or nil if it doesn't exist
FoundComponent = Space.Host.ExecutingObject.GetComponent("Component Name")
Is this object Active in the scene
Gets/Sets the object onto a particular layer (0-31)
Gets this objects Tag
Gets/sets the name of this object
Does this object still exist in the scene (returns false if the object has been deleted via Destroy();)
Gets/sets the parent GameObject of this object. Assign nil/null to set this as the root.
-- This Scripting Runtime is the component of the "Cube" object.
-- 1 Object Reference is used: Name: Cube1, references "Cube (1)".
local obj = Space.Host.ExecutingObject;
obj.Parent = Space.Host.GetReference("Cube1");
Gets the root of this object group - may be this object.
-- "Cube" is the parent of "Cube (1)", "Cube (1)" is the parent of "Cube (2)"
-- This Scripting Runtime is the component of the "Cube (2)" object.
local obj = Space.Host.ExecutingObject;
Space.Log(obj.Root.Name);
Returns the list of direct children of this object.
-- "Cube" is the parent of both "Cube (1)" and "Cube (2)" (in this order in the hierarchy).
-- This Scripting Runtime is the component of the "Cube" object.
local obj = Space.Host.ExecutingObject;
Space.Log(obj.Children[1].Name);
-- prints "Cube (1)" to the console
Space.Log(obj.Children[2].Name);
Gets or sets the current position of this object relative to the scene
Space.Host.ExecutingObject.WorldPosition = Vector.New(1,1,1)
Gets or sets the current position of this object relative to the objects parent, taking into account local position/scale/rotation
Space.Host.ExecutingObject.LocalPosition = Vector.New(1,1,1)
Gets or sets the current rotation of this object relative to the scene
Space.Host.ExecutingObject.WorldRotation = Quaternion.Euler(0,180,0)
Gets or sets the current rotation of this object relative to the parent object
Space.Host.ExecutingObject.LocalRotation = Quaternion.Euler(0,180,0)
Gets or sets the current scale of this object relative to the parent
Space.Host.ExecutingObject.LocalScale = Vector.New(2,2,2)
Gets the current scale of this object relative to the scene
worldScale = Space.Host.ExecutingObject.WorldScale
Returns the forward direction vector of this game object (blue arrow)
obj.WorldRotation = Quaternion.Euler(0,0,0);
Space.Log(obj.Forward);
-- prints "[0,0,1]" to the console
obj.WorldRotation = Quaternion.Euler(0,90,0);
Space.Log(obj.Forward);
--the below script will make this object keep moving Forward (the rotation it is facing) --(Example: Shooting a bullet to your front) --<Note: We multiplied .Forward by Space.DeltaTime to achieve movement per second not per frame> --<Note: If you want to go backwards you can just minus from the WorldPosition instead of add> thisGameObject = Space.Host.ExecutingObject SPEED = 2 OnUpdate = function() thisGameObject.WorldPosition = thisGameObject.WorldPosition + (thisGameObject.Forward * Space.DeltaTime * SPEED) end thisGameObject.SubscribeToEvents() thisGameObject.OnUpdate(OnUpdate)
Returns the up direction vector of this game object (green arrow)
obj.WorldRotation = Quaternion.Euler(0,0,0);
Space.Log(obj.Up);
-- prints "[0,1,0]" to the console
obj.WorldRotation = Quaternion.Euler(90,0,0);
Space.Log(obj.Up);
Returns the right direction vector of this game object (red arrow)
obj.WorldRotation = Quaternion.Euler(0,0,0);
Space.Log(obj.Right);
-- prints "[1,0,0]" to the console
obj.WorldRotation = Quaternion.Euler(0,0,90);
Space.Log(obj.Right);
--the below script will make this object keep moving to it's Right --(Example: Shooting a bullet to your right) --<Note: We multiplied .Right by Space.DeltaTime to achieve movement per second not per frame> --<Note: If you want to go left you can just minus from the WorldPosition instead of add> thisGameObject = Space.Host.ExecutingObject SPEED = 1 OnUpdate = function() thisGameObject.WorldPosition = thisGameObject.WorldPosition + (thisGameObject.Right * Space.DeltaTime * SPEED) end thisGameObject.SubscribeToEvents() thisGameObject.OnUpdate(OnUpdate)
Returns a reference to a Light component on the object. Will return null if it does not exist.
-- add the Light component to the object if there is none
if obj.Light == null then
end
-- Now we can work with the Light component on this object.
-- For example, let's set its colour to Red:
Returns a reference to a Animator component on the object. Will return null if it does not exist.
Space.Log(obj.Animator);
Returns a reference to a AudioSource component on the object. Will return null if it does not exist.
-- add the AudioSource component to the object if there is none
if obj.Audio == null then
end
Space.Log(obj.Audio);
-- Now we can work with the AudioSource component on this object.
-- For example, let's set its volume to 0.25:
Returns a reference to a BrowserSurface component on the object. Will return null if it does not exist.
-- If this object has a BrowserSurface component, the script will reload the page in it
if obj.Browser ~= null then
Returns a reference to a Renderer component on the object. Will return null if it does not exist.
-- If this object has a Renderer component, let's colour its material blue!
if obj.Renderer ~= null then
Returns a reference to a Clickable component on the object. Will return null if it does not exist.
-- add the Clickable component to the object if there is none
if obj.Clickable == null then
end
Space.Log(obj.Clickable);
--Now we can work with the Clickable component on this object.
-- Let's add an option for the object to be moved up by 1 every time that option is chosen:
local deltaPos = Vector.New(0,1,0);
function MoveItUp ()
end
Returns a reference to a Rigidbody component on the object. Will return null if it does not exist.
-- add the Rigidbody component to the object if there is none
if obj.Rigidbody == null then
end
Space.Log(obj.Rigidbody);
-- Now we can work with the Rigidbody component on this object.
-- Let's make it spin!
obj.Rigidbody.UseGravity = false;
obj.Rigidbody.AngularDrag = 0;
Returns a reference to a Collider component on the object. Will return null if it does not exist.
-- If this object has a Collider component, let's make it a trigger:
if obj.Collider ~= null then
Returns a reference to a UI.Text component on the object. Will return null if it does not exist.
uitext = Space.Host.ExecutingObject.UIText
Returns a reference to a NavMeshAgent component on the object. Will return null if it does not exist.
-- add the NavMeshAgent component to the object if there is none
if obj.NavMeshAgent == null then
end
Space.Log(obj.NavMeshAgent);
Returns a reference to a Seat component on the object. Will return null if it does not exist.
-- add the Seat component to the object if there is none
if obj.Seat == null then
end
Space.Log(obj.Seat);
Returns the GameObject's Owner
Owner = Space.Host.ExecutingObject.Owner
Returns the GameObject's Local ID
LocalID = Space.Host.ExecutingObject.LocalID
Return's the GameObject's InventoryID
InventoryID = Space.Host.ExecutingObject.InventoryID
Returns true if GameObject has Stable ID
HasStableID = Space.Host.ExecutingObject.HasStableID
Returns the global ID of the GameObject
GlobalID = Space.Host.ExecutingObject.GlobalID
Returns a HingeJoint component attached to this object, or nil if none exist
HingeJoint = Space.Host.ExecutingObject.HingeJoint
Returns a Light component attached to this object, or nil if none exist
Light = Space.Host.ExecutingObject.Light
Returns a ReflectionProbe component attached to this object, or nil if none exist
ReflectionProbe = Space.Host.ExecutingObject.ReflectionProbe
Returns a Light component attached to this object or its children, or nil if none exist
LightInChild = Space.Host.ExecutingObject.LightInChild
Returns a Light component attached to this object or it's parent, or nil if none exist
LightInParent = Space.Host.ExecutingObject.LightInParent
Returns a RoomFloor component attached to this object, or nil if none exist
Floor = Space.Host.ExecutingObject.Floor
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
Animation = Space.Host.ExecutingObject.Animation
Returns Canvas Group component attached to this object, or nil if none exist
CanvasGroup = Space.Host.ExecutingObject.CanvasGroup
Returns a VoiceZone component attached to this object, or nil if none exist
VoiceZone = Space.Host.ExecutingObject.VoiceZone
Returns a PlayableDirector component attached to this object, or nil if none exist
Director = Space.Host.ExecutingObject.Director
Returns a Modular Vehicle component attached to this object, or nil if none exist
Vehicle = Space.Host.ExecutingObject.Vehicle
Returns a Post Process Volume component attached to this object, or nil if none exist
PostProcessVolume = Space.Host.ExecutingObject.PostProcessVolume
Returns a Archimatix Model ("AXModel" component) - or Nil if nothing exists
Archimatix = Space.Host.ExecutingObject.Archimatix
Returns an Embedded Video component attached to this object, or nil if none exist (may not work within editor)
EmbeddedVideo = Space.Host.ExecutingObject.EmbeddedVideo
Return's GameObject's Avatar
Avatar = Space.Host.ExecutingObject.Avatar
Returns a AvatarAppearance component attached to this object, or nil if none exist
AvatarAppearance = Space.Host.ExecutingObject.AvatarAppearance
Returns a Scripting Runtime component attached to this object, or nil if none exist
Script = Space.Host.ExecutingObject.Script
Returns a State Machine component attached to this object, or nil if none exist
StateMachine = Space.Host.ExecutingObject.StateMachine
Returns a Scripting Events component attached to this object, or nil if none exist
Events = Space.Host.ExecutingObject.Events
Returns a Scripting Data component attached to this object, or nil if none exist
Data = Space.Host.ExecutingObject.Data
Returns a Box Collider component attached to this object, or nil if none exist
BoxCollider = Space.Host.ExecutingObject.BoxCollider
Returns a Sphere Collider component attached to this object, or nil if none exist
SphereCollider = Space.Host.ExecutingObject.SphereCollider
Returns a Capsule Collider component attached to this object, or nil if none exist
CapsuleCollider = Space.Host.ExecutingObject.CapsuleCollider
Returns a Character Controller component attached to this object, or nil if none exist
CharacterController = Space.Host.ExecutingObject.CharacterController
Returns the first Audio Reactive component attached to this object, or nil if none exist
AudioReactive = Space.Host.ExecutingObject.AudioReactive
Returns the first Attachment Helper component attached to this object, or nil if none exist
AttachmentHelper = Space.Host.ExecutingObject.AttachmentHelper
Returns the first Audio Reactive Animation component attached to this object, or nil if none exist
AudioReactiveAnimation = Space.Host.ExecutingObject.AudioReactiveAnimation
Returns the first Audio Reactive Light component attached to this object, or nil if none exist
AudioReactiveLight = Space.Host.ExecutingObject.AudioReactiveLight
Returns the first Audio Reactive Particle System component attached to this object, or nil if none exist
AudioReactiveParticleSystem = Space.Host.ExecutingObject.AudioReactiveParticleSystem
Returns the first Audio Reactive Material component attached to this object, or nil if none exist
AudioReactiveMaterial = Space.Host.ExecutingObject.AudioReactiveMaterial
Returns the first Audio Reactive Transform component attached to this object, or nil if none exist
AudioReactiveTransform = Space.Host.ExecutingObject.AudioReactiveTransform
Returns a Unity component attached to this object, or nil if none exist
TrailRenderer = Space.Host.ExecutingObject.TrailRenderer
Returns a Unity component attached to this object, or nil if none exist
LineRenderer = Space.Host.ExecutingObject.LineRenderer
Returns a Renderer component attached to this object, or nil if none exist
UILayout = Space.Host.ExecutingObject.UILayout
Returns a Unity uGUI Toggle component attached to this object, or nil if none exist
UIToggle = Space.Host.ExecutingObject.UIToggle
Returns a Unity uGUI Dropdown component attached to this object, or nil if none exist
UIDropdown = Space.Host.ExecutingObject.UIDropdown
Returns a Unity uGUI Dropdown component attached to this object, or nil if none exist
UIButton = Space.Host.ExecutingObject.UIButton
Returns a Unity uGUI Slider component attached to this object, or nil if none exist
UISlider = Space.Host.ExecutingObject.UISlider
Returns a Unity uGUI Scrollbar component attached to this object, or nil if none exist
UIScrollbar = Space.Host.ExecutingObject.UIScrollbar
Returns a Unity uGUI Canvas component attached to this object, or nil if none exist
UICanvas = Space.Host.ExecutingObject.UICanvas
Returns a Unity uGUI Image component attached to this object, or nil if none exist
UIImage = Space.Host.ExecutingObject.UIImage
Returns a Unity uGUI Text component attached to this object, or nil if none exist
UIRawImage = Space.Host.ExecutingObject.UIRawImage
Returns a Unity uGUI Text component attached to this object, or nil if none exist
UIInputField = Space.Host.ExecutingObject.UIInputField
Returns a VirtualCamera component attached to this object, or nil if none exists
VirtualCamera = Space.Host.ExecutingObject.VirtualCamera
Returns a Cloth component attached to this object, or nil if none exists
Cloth = Space.Host.ExecutingObject.Cloth
Returns a MeshRenderer component attached to this object, or nil if none exists
MeshRenderer = Space.Host.ExecutingObject.MeshRenderer
Returns a Furniture component attached to this object, or nil if none exists
Furniture = Space.Host.ExecutingObject.Furniture
Returns a ParticleSystem component attached to this object, or nil if none exists
ParticleSystem = Space.Host.ExecutingObject.ParticleSystem
Returns a NavMeshObstacle component attached to this object, or nil if none exists
NavMeshObstacle = Space.Host.ExecutingObject.NavMeshObstacle
Returns a Simple Networking component attached to this object, or nil if none exists
SimpleNetworking = Space.Host.ExecutingObject.Networking
Returns a RectTransform component attached to this object, or nil if none exists
RectTransform = Space.Host.ExecutingObject.RectTransform
Returns a SkinnedMeshRenderer component attached to this object, or nil if none exists
SkinnedMeshRenderer = Space.Host.ExecutingObject.SkinnedMeshRenderer
Returns a SceneBackgroundMusic component attached to this object, or nil if none exists
Radio = Space.Host.ExecutingObject.Radio
Returns a Terrain component attached to this object, or nil if none exists
Terrain = Space.Host.ExecutingObject.Terrain
Returns true if GameObject is Alive
Alive = Space.Host.ExecutingObject.Alive
Returns true if GameObject is Active (even if it's parent is not active)
ActiveSelf = Space.Host.ExecutingObject.ActiveSelf
Returns an EventCalendar component attached to this object, or nil if none exists
EventCalendar = Space.Host.ExecutingObject.EventCalendar
|