Namespace: dmGameObject
Language: C++
Type: Defold C++
File: script.h
Source: engine/gameobject/src/dmsdk/gameobject/script.h
Include: dmsdk/gameobject/script.h
GameObject script API documentation
Type: FUNCTION Sends a script message. Wraps the message in a dmGameSystemDDF::ScriptMessage struct.
Template Parameters
TParameters
message (T*) - The ddf message to sendsender (dmMessage::Message*) - The senderreceiver (dmMessage::Message*) - The receiverfunction_ref (int) - The function ref. 0 wil cause the “on_message” to be calledunref_function_after_call (bool) - call dmScript::UnrefInInstance on the function_ref after the dmScript::PCall is madeReturns
success (bool) - true if successfulType: FUNCTION Sends a script message to unreference a script object
Parameters
sender (dmMessage::Message*) - The senderreceiver (dmMessage::Message*) - The receiverreference (int) - The reference to removeReturns
success (Result) - RESULT_OK if successfulType: FUNCTION Creates a property container from a lua table
Parameters
L (lua_State*) - The lua stateindex (int) - The lua stack index of the lua tableReturns
container (HPropertyContainer) - The property container