wiki.sine.space | sinespace

Scripting/ScriptClass

From wiki.sine.space
Revision as of 07:41, 31 December 2020 by Edisonwu (Talk | contribs) (Created page with "=Properties= {{ScriptFunction|SGameObject|GameObject|{get;}|Return the GameObject which component added.|5= collider = Space.Scene.Find("Cube").Collider<br> ''--get the sampl...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Properties

GameObject

SGameObject GameObject {get;}

Return the GameObject which component added.

collider = Space.Scene.Find("Cube").Collider

--get the sample component collider here.
obj = collider.GameObject
--get the game object from collider component.
Space.Log(obj.Name)

--output name of the component added to.



Alive

bool Alive {get;}

Return if the component is alive.

collider = Space.Scene.Find("Cube").Collider

--get the sample component collider here.
obj = collider.GameObject
--get the game object from collider component.
Space.Log(obj.Alive)

--print true to console.