unity c# get if object is active 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)
// To check if a GameObject is active:
gameObject.activeSelf;
if (myGameObject.activeSelf)