You've successfully subscribed to Hacking with Unity - Learn how to create your own games
Great! Next, complete checkout for full access to Hacking with Unity - Learn how to create your own games
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

Get game object active status in script

Ben Liu
Ben Liu

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.

Ben Liu

Please feel free to contact me if you have any question. <br> https://t.me/NeedoneApp