unity check if gameobject is active

C#
// To check if a GameObject is active:
gameObject.activeSelf;
Source

Also in C#: