how to check if a object is active or not with script in unity code example Example: how to check if an object is active in unity if (myGameObject.activeSelf)