Skip to main content

ScriptableObject

Associated namespace: sm.scriptableObject

A userdata object representing a scriptable object.

Values:

  • clientPublicData [ table ]

    • Get: (Client-Only) The objects's client public data.
    • Set: (Client-Only) Sets the objects's client public data.
  • id [ int ]

    • Get: The object's id.
  • publicData [ table ]

    • Get: (Server-Only) The object's server public data.
    • Set: (Server-Only) Sets the object's server public data.
  • world [ world ]

    • Get: The object's world.

Operations:

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

Functions

destroy

scriptableObject:destroy()

Server-Only

Destroys the object.

Parameters:


getClientPublicData

scriptableObject:getClientPublicData()

Client-Only

Returns the object's client public data.

Parameters:

Returns:

  • (table): The objects's client public data.

getId

scriptableObject:getId()

Returns the object's id.

Parameters:

Returns:

  • (int): The objects's id.

getPublicData

scriptableObject:getPublicData()

Server-Only

Returns the object's server public data.

Parameters:

Returns:

  • (table): The objects's server public data.

getWorld

scriptableObject:getWorld()

Returns the object's world.

Parameters:

Returns:

  • (World): The objects's world.

setClientPublicData

scriptableObject:setClientPublicData( data )

Client-Only

Sets the object's client public data.

Parameters:

  • scriptableObject (ScriptableObject): The scriptable object.
  • data (table): The data to set.

setPublicData

scriptableObject:setPublicData( data )

Server-Only

Sets the object's server public data.

Parameters:

  • scriptableObject (ScriptableObject): The scriptable object.
  • data (table): The data to set.