Hide Full Scene (With UI, GameObjects, Entities)

I have a main scene that’s complex and needs to be loaded at all times, but I have some other editing scenes that I would like to load in front of or atop the main scene. Is there a way to completely isolate scene rendering so that the main scene is loaded, but not rendered - only the secondary scene is rendered.

The complexity:

  1. I can disable game objects, but that breaks their functionality so that they aren’t updating
  2. There doesn’t seem to be a way to easily hide all entities (ECS implementation)
  3. I can add a UI panel to cover the screen, and if I order the loaded scenes so that the secondary scene is on top, it does hide everything in the main scene, but that blocks the game objects and entities in the secondary scene.

I may be able to load offset the second scene in a far off location, so that the main scene is out of sight but still there, however, that doesn’t fix having another skybox and other issues with rendering two scenes together. It would be great to have a scene visibility option.


For gameobjects and entities you could use a separate layer to be turned on/off when needed, camera.cullingMask &= ~(1 << LayerMask.NameToLayer("Your Layer")); to turn off the layer and camera.cullingMask |= 1 << LayerMask.NameToLayer("Your Layer"); to turn it back on. The UI elements unfortunately don’t seem to care about layers so what seems to be the easiest way to hide them is changing the targetDisplay property of the Canvas canvas.targetDisplay = 1 to hide UI elements and canvas.targetDisplay = 0 to bring them back.