how to tell if a gameobject is enabled in unity code example
Example: unity check if gameobject is active
// To check if a GameObject is active:
gameObject.activeSelf;
// To check if a GameObject is active:
gameObject.activeSelf;