ScriptableObject

Associated namespace: sm.scriptableObject

A userdata object representing a scriptable object.

Values:

Functions:

Operations:

OperationDescription
ScriptableObject == ScriptableObjectChecks if two instances of ScriptableObject refer to the same ScriptableObject.

clientPublicData table

Get:

Client only

Returns client public data from a scriptableObject.

Set:

Client only

Sets client public data on a scriptableObject.


id number

Get:

Returns the id of a scriptable object.


publicData table

Get:

Server only

Returns (server) public data from a scriptableObject.

Set:

Server only

Sets (server) public data on a scriptableObject.


world World

Get:

Returns the worldId of a scriptable object.


destroy(scriptableObject)

Server only

Destroys a scriptable Object.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptable object.

getClientPublicData(scriptableObject)

Client only

Returns client public data from a scriptableObject.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptableObject.

Returns:

TypeDescription
tableThe client public data.

getId(scriptableObject)

Returns the id of a scriptable object.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptable object.

Returns:

TypeDescription
numberid The scriptableObject id.

getPublicData(scriptableObject)

Server only

Returns (server) public data from a scriptableObject.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptableObject.

Returns:

TypeDescription
tableThe public data.

getWorld(scriptableObject)

Returns the worldId of a scriptable object.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptable object.

Returns:

TypeDescription
Worldworld The world.

setClientPublicData(scriptableObject, data)

Client only

Sets client public data on a scriptableObject.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptableObject.
tabledataThe client public data.

setPublicData(scriptableObject, data)

Server only

Sets (server) public data on a scriptableObject.

Parameters:

TypeNameDescription
ScriptableObjectscriptableObjectThe scriptableObject.
tabledataThe public data.