Skip to main content

GameObject.SendMessage(string methodName, any value = nil)

Calls the method named methodName on every lua script in this game object.

Parameters:

NameTypeDescription
methodNamestringThe name of the method to call.
valueanyAn optional parameter value to pass to the called method.

Usage

---@type GameObject
local gameobject;

---@type string
local methodName;

---@type any
local value;


gameobject.SendMessage(methodName, value)