how to check if a game object is active or not in unity 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)