Skip to main content

GameObject.BroadcastMessage(string methodName, any parameter = nil)

Calls the method named methodName on every lua script in this game object or any of its children.

Parameters:

NameTypeDescription
methodNamestringmethod Name
parameteranyoptional parameter

Usage

---@type GameObject
local gameobject;

---@type string
local methodName;

---@type any
local parameter;


gameobject.BroadcastMessage(methodName, parameter)