ClientScriptableObject
Associated namespace: sm.clientScriptableObject
A userdata object representing a scriptable object.
Values:
Functions:
Operations:
| Operation | Return type | Description |
|---|---|---|
| ClientScriptableObject == ClientScriptableObject | boolean | Checks if two instances of ClientScriptableObject refer to the same ClientScriptableObject. |
clientPublicData table
Get:
Client only
Returns public data from a client scriptable object.
Set:
Client only
Sets public data on a client scriptable object.
id number
Get:
Client only
Returns the id of a client scriptable object.
world World
Get:
Client only
Returns the worldId of a client scriptable object.
destroy(clientScriptableObject)
Client only
Destroys a client scriptable Object.
Parameters:
| Type | Name | Description |
|---|---|---|
| ClientScriptableObject | clientScriptableObject | The scriptable object. |
getClientPublicData(scriptableObject)
Client only
Returns public data from a client scriptable object.
Parameters:
| Type | Name | Description |
|---|---|---|
| ScriptableObject | scriptableObject | The scriptableObject. |
Returns:
| Type | Description |
|---|---|
| table | The client public data. |
getData(scriptableObject)
Client only
Returns json data from a client scriptableObject.
Parameters:
| Type | Name | Description |
|---|---|---|
| ScriptableObject | scriptableObject | The scriptableObject. |
Returns:
| Type | Description |
|---|---|
| table | The json data. |
getId(clientScriptableObject)
Client only
Returns the id of a client scriptable object.
Parameters:
| Type | Name | Description |
|---|---|---|
| ClientScriptableObject | clientScriptableObject | The scriptable object. |
Returns:
| Type | Description |
|---|---|
| number | id The clientScriptableObject id. |
getWorld(scriptableObject)
Client only
Returns the worldId of a client scriptable object.
Parameters:
| Type | Name | Description |
|---|---|---|
| ScriptableObject | scriptableObject | The scriptable object. |
Returns:
| Type | Description |
|---|---|
| World | world The world. |
setClientPublicData(scriptableObject, data)
Client only
Sets public data on a client scriptable object.
Parameters:
| Type | Name | Description |
|---|---|---|
| ScriptableObject | scriptableObject | The scriptableObject. |
| table | data | The client public data. |