unity check if object is not active code example
Example 1: 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");
}
Example 2: how to check if an object is active in unity
if (myGameObject.activeSelf)