Get game object active status in script

· 1 min read

It is quite often important to know whether a game object is active or not.

bool menuStatus = gameobject.activeSelf;

gameObject is the game object in the hierarchy. We can use this way to determine whether a gameObject is active or not.