Exemple #1
0
 public bool IsHidden(GameObject gameObject, bool includeDescendants = false)
 {
     if (includeDescendants)
     {
         return(SceneVisibilityState.IsHierarchyHidden(gameObject));
     }
     else
     {
         return(SceneVisibilityState.IsGameObjectHidden(gameObject));
     }
 }
Exemple #2
0
        public bool IsHidden(Scene scene)
        {
            scene.GetRootGameObjects(m_RootBuffer);
            foreach (var rootGameObject in m_RootBuffer)
            {
                if (!SceneVisibilityState.IsHierarchyHidden(rootGameObject))
                {
                    return(false);
                }
            }

            return(true);
        }
        public bool AreAllDescendantsHidden(Scene scene)
        {
            if (scene.rootCount == 0)
            {
                return(false);
            }

            scene.GetRootGameObjects(m_RootBuffer);
            foreach (GameObject root in m_RootBuffer)
            {
                if (!SceneVisibilityState.IsHierarchyHidden(root))
                {
                    return(false);
                }
            }

            return(true);
        }