ScriptableObject

A userdata object representing a scriptable object.

Values:

  • 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 world of a scriptable object.

Operations:

Operation Returns Description
ScriptableObject == ScriptableObject boolean Checks if two instances of ScriptableObject refer to the same ScriptableObject.

Server + Client

getData

scriptableObject:getData(  )

Returns json data from a scriptableObject.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptableObject.

Returns:

Type Description
table The json data.

getId

scriptableObject:getId(  )

Returns the id of a scriptable object.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptable object.

Returns:

Name Type Description
id number The scriptableObject id.

getWorld

scriptableObject:getWorld(  )

Returns the world of a scriptable object.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptable object.

Returns:

Name Type Description
world World The world.

Server-only

destroy

scriptableObject:destroy(  )

Destroys a scriptable Object.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptable object.

getPublicData

scriptableObject:getPublicData(  )

Returns (server) public data from a scriptableObject.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptableObject.

Returns:

Type Description
table The public data.

setPublicData

scriptableObject:setPublicData( data )

Sets (server) public data on a scriptableObject.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptableObject.
data table The public data.

Client-only

getClientPublicData

scriptableObject:getClientPublicData(  )

Returns client public data from a scriptableObject.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptableObject.

Returns:

Type Description
table The client public data.

setClientPublicData

scriptableObject:setClientPublicData( data )

Sets client public data on a scriptableObject.

Parameters:

Name Type Description
scriptableObject ScriptableObject The scriptableObject.
data table The client public data.