ScriptableObject
Associated namespace: sm.scriptableObject
A userdata object representing a scriptable object.
Values:
Functions:
Operations:
Operation | Description |
---|---|
ScriptableObject == ScriptableObject | Checks 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:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptable object. |
getClientPublicData(scriptableObject)
Client only
Returns client public data from a scriptableObject.
Parameters:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptableObject. |
Returns:
Type | Description |
---|---|
table | The client public data. |
getId(scriptableObject)
Returns the id of a scriptable object.
Parameters:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptable object. |
Returns:
Type | Description |
---|---|
number | id The scriptableObject id. |
getPublicData(scriptableObject)
Server only
Returns (server) public data from a scriptableObject.
Parameters:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptableObject. |
Returns:
Type | Description |
---|---|
table | The public data. |
getWorld(scriptableObject)
Returns the worldId of a scriptable object.
Parameters:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptable object. |
Returns:
Type | Description |
---|---|
World | world The world. |
setClientPublicData(scriptableObject, data)
Client only
Sets client public data on a scriptableObject.
Parameters:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptableObject. |
table | data | The client public data. |
setPublicData(scriptableObject, data)
Server only
Sets (server) public data on a scriptableObject.
Parameters:
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | The scriptableObject. |
table | data | The public data. |