Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Scene Visibility for whole scene only hides, doesn't show

Discussion in 'Editor & General Support' started by dgoyette, May 14, 2019.

  1. dgoyette


    Jul 1, 2016
    If I click the spot circled in red below, it will hide all of the objects in the scene.



    Okay. But now if I click that icon again, nothing happens. I can't "show" all the objects in the scene, only hide them. Every time I accidentally click this, I then have to unhide everything in the scene one at a time with their individual icons. I can't find a combination of clicks/buttons that allow that top-level icon to show the items.

    What am I missing?
  2. phoenix0330


    Dec 4, 2010
    this is a problem for me to, the tool is great but to unhide is a problem, i use a trick, create an empty Game Object and add all of the scene inside this, and then select to show the gameobject and it should unhide the rest of the scene. 1 transform to rule them all XD
  3. dgoyette


    Jul 1, 2016
    I believe I understand what's causing this now, and I've reported it as a bug (1156127). It seems that Scene Visibility doesn't play nicely with HideFlags.HideInHierarchy. Put this script on any object in the scene, and you'll no longer be able to Show All at the scene level with the Scene Visibility tool:

    Code (CSharp):
    1. [ExecuteInEditMode]
    2. public class HiderScript : MonoBehaviour
    3. {
    4.     // Start is called before the first frame update
    5.     void Start()
    6.     {
    7.         var go = new GameObject("Junk");
    8.         go.transform.SetParent(this.transform);
    9.         go.hideFlags = HideFlags.HideInHierarchy;
    10.     }
    12. }
    The hidden child objects are confusing Scene Visibility into thinking it's in an indeterminate state permanently.