Skip to main content

Object

Client Server

The object visible in the hierarchy. Every object has a transform and can have additional components attached to it.

Methods​

Object GetChild(string)​

Get child object by name

Object GetChildById(Guid)​

boolean RemoveParent()​

boolean IsPrefab()​

boolean IsPrefab(string)​

Script AddScript(string, boolean)​

MeshData AddMeshData()​

VoxelData AddVoxelData(string)​

StaticVoxelData AddStaticVoxelData(string)​

VoxelRenderer AddVoxelRenderer()​

Camera AddCamera()​

Sky AddSkybox()​

userdata AddComponent(string)​

boolean RemoveComponent(string)​

boolean RemoveComponent(userdata)​

userdata GetComponentByType(string)​

Find a component by type name. Returns the first component found

table GetComponentsByType(string)​

Find all components by type name

userdata FindScript(string)​

Find attached script component lua table by name

Camera GetCamera()​

string GetNetworkFlow()​

string GetScriptUpdateTime()​

integer GetRefCount()​

Properties​

Transform transform​

Get the transform to modify the position, rotation and scale of the object

boolean isDestroyed​

True if the object was destroyed. Note that references to this object will still be valid

string id​

This is id is unique across clients and server

string name​

boolean active​

Set the object to be active or inactive. Inactive objects are not updated or rendered. All its children also become inactive.

boolean activeInHierarchy​

Readonly. Check if the object is active in the scene. It may be inactive because a parent is inactive.

boolean save​

Save this object in the hierarchy. If not saved it will be deleted after lua reset or server restart

Object parent​

table children​

integer childCount​

integer siblingIndex​

boolean isPrefabObject​

table components​

integer componentsCount​