Skip to content

Api > SyncVar > Exists()


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

Checks if a synchronized variable with given name exists.

Parameters:⚓︎

Name Type Description
script LuaBehaviour The script object. Can be accessed from LUA.script.
name string Name of variable.
gloabl boolean Check in global scope?

Returns:⚓︎

type Description
boolean Ture if the variable exists.

Usage⚓︎

---@type LuaBehaviour
local script;

---@type string
local name;

---@type boolean
local gloabl;


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