see of item is active unity code example
Example 1: check if gameobject is active
if (gameObject.activeSelf)
{
// this happens when object is active
}
Example 2: how to check if an object is active in unity
if (myGameObject.activeSelf)
Example 3: check if enabled unity
if (gameObject.activeSelf )
{
print("It is Activated.")
}