LuaEvents.InvokeLocalForMaster(LuaBehaviour script, string eventName, [optionalArguments] optional-arguments)
Like InvokeForMaster()
but invokes the local event that defined in the exact similar game object and Lua Script in all the master client. This requires for that game object to be existed during the build or instantiated using network methods.
Parameters:
Name | Type | Description |
---|---|---|
script | LuaBehaviour | The current running script object from LUA.script . |
eventName | string | The name of the local event. |
optional-arguments | [optionalArguments] | Optional parameters to pass. |
Usage
---@type LuaBehaviour
local script;
---@type string
local eventName;
---@type [optionalArguments]
local optional-arguments;
LuaEvents:InvokeLocalForMaster(script, eventName, optional-arguments)