Skip to main content

SyncVar.Exists(LuaBehaviour script, string name, boolean gloabl = false)

Checks if a synchronized variable with given name exists.

Parameters:

NameTypeDescription
scriptLuaBehaviourThe script object. Can be accessed from LUA.script.
namestringName of variable.
gloablbooleanCheck in global scope?

Returns:

typeDescription
booleanTure if the variable exists.

Usage

---@type LuaBehaviour
local script;

---@type string
local name;

---@type boolean
local gloabl;


local val0 = SyncVar:Exists(script, name, gloabl)