Answers for "unity check if gameobject is active"

C#
14

check if gameobject is active

if (gameObject.activeSelf)
{
	// this happens when object is active
}
Posted by: Guest on July-17-2020
2

unity check if object is not active

// Check if gameobject is active or false
if (gameObject.activeSelf == true)
{
    Debug.Log("Is active");
}
else if (gameObject.activeSelf == false)
{
    Debug.Log("Not active");
}
Posted by: Guest on June-12-2021
7

unity check if gameobject is active

// To check if a GameObject is active:
gameObject.activeSelf;
Posted by: Guest on March-08-2020

Code answers related to "unity check if gameobject is active"

C# Answers by Framework

Browse Popular Code Answers by Language