From Teverse

Assets is a property of engine and is the main container for some of the core components of a game. Assets is a singleton that can be accessed via engine.assets. Children cannot be added to this class.


lua [readonly]

Type: luaFolder
This Lua folder contains the luaServerFolder, luaClientFolder and luaSharedFolder

Inherited from the base class:


Type: string
A none unique identifier

className [readonly]

Type: string
The name of the object’s class

id [readonly][restricted]

Type: number
A unique identifier used internally, use is not recommended as this may be nil

children [readonly]

Type: table
A readonly table of child objects, a reference to this table will not remain up to date


Inherited from the base class:


nil assets:destroy()
Locks the object before removing it from the hierarchy. Children will also be destroyed.


nil assets:destroyAllChildren()
Calls the destroy method on each child of this instance.


string assets:isContainer()
Locks the object before removing it from the hierarchy.


variant assets:clone()
Constructs a new object with the same properties, this will only work on classes that you are able to create manually.


variant assets:hasChild(string childName)
If a child with the name specified is found, that child is returned. Otherwise this returns nil.


boolean assets:isDescendantOf(baseClass ancestor)
Returns true if this object is a descendant of ancestor.


Inherited from the base class:


eventListener assets:changed(function(string property, variant value))
Fired when a property of this object is changed. Returns the property that was changed and the new value.


eventListener assets:childAdded(function(variant child))
Fired when child is parented to this.