Skip to main content

GameObject.SetActive(boolean value)

Activates/Deactivates the GameObject, depending on the given true or false value.

Parameters:

NameTypeDescription
valuebooleanActivate or deactivate the object, where true activates the GameObject and false deactivates the GameObject.

Usage

---@type GameObject
local gameobject;

---@type boolean
local value;


gameobject.SetActive(value)