chekc if gameobject is active code example
Example 1: check if gameobject is active
if (gameObject.activeSelf)
{
// this happens when object is active
}
Example 2: unity check gameobject active
if (gameObject.activeInHierarchy)
if (gameObject.activeSelf)
{
// this happens when object is active
}
if (gameObject.activeInHierarchy)