check if an object is active unity transform code example
Example 1: unity check if gameobject is active
// To check if a GameObject is active:
gameObject.activeSelf;
Example 2: how to check if an object is active in unity
if (myGameObject.activeSelf)