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.

Arguments:

getClientPublicData

scriptableObject:getClientPublicData()
Client-Only

Returns the object's client public data.

Arguments:
Returns:
  • [ table ]: The objects's client public data.

getId

scriptableObject:getId()

Returns the object's id.

Arguments:
Returns:
  • [ int ]: The objects's id.

getPublicData

scriptableObject:getPublicData()
Server-Only

Returns the object's server public data.

Arguments:
Returns:
  • [ table ]: The objects's server public data.

getWorld

scriptableObject:getWorld()

Returns the object's world.

Arguments:
Returns:

setClientPublicData

scriptableObject:setClientPublicData( data )
Client-Only

Sets the object's client public data.

Arguments:
  • scriptableObject [ ScriptableObject ]: The scriptable object.
  • data [ table ]: The data to set.

setPublicData

scriptableObject:setPublicData( data )
Server-Only

Sets the object's server public data.

Arguments:
  • scriptableObject [ ScriptableObject ]: The scriptable object.
  • data [ table ]: The data to set.