Virtual Scenes - include multiple mini-scenes into a single Scene, with a custom GUI to visualise and manage them.
[Pending review, this will appear on Asset Store (here)]
Typical use-cases:
- Make Unity’s new “Giant, IN YOUR FACE!” annoying GUI-editor get out of the way
- Indoors and outdoors areas in one Unity Scene
- Put your RenderTexture cameras out of the way, but easily find and edit them
- Manage large scenes with many cameras: define each camera-location as a different Virtual Scene, and easily jump between them, move things from area to area, etc
I created this because I was doing a lot of work with the new GUI, and I needed to embed multiple RenderTexture / virtual cameras (e.g. one showing units walking around, another one showing a world map, another one showing top-down view of player’s city).
It’s a mess, in Unity. In a normal game-engine, I’d have made each camera a “Scene” (this is standard, but impossible with Unity - you can only use one scene at once). Solution: virtual scenes, emulated within a single Unity scene.
Features working at the moment:
- Each Virtual Scene has its own name (can rename whatever you like)
- Fully integrated with Unity Editor – selecting a VirtualScene in Hierarchy selects it in the Scenes Inspector, and vice-versa
- You can right-click any GameObject / selected GameObjects and “move them to a Virtual Scene”
- When moving-to-scene, if things have a parent, they got to the same localPosition in the Virtual Scene; this makes it very easy to organize things in different Virtual Scenes and move them to/from your main Scene
- A SceneManager lets you easily find, view, and jump the Editor “Scene View” to each one
- It also manages and (re-)positions them when needed (if you decide to delete some, add some, change how far “far away” is because you made your main Terrain bigger, etc)
- They optionally have a “Scene Camera” (which is a local version of MainCamera); when you jump to a scene, it takes you to “looking hrough the Scene Camera” since that’s normally what the sub-scene is being used for
- Setup is all automatic: if you open the Virtual Scene Manager, it automatically configures itself and adds a Virtual Scenes system to the current Scene — (this was hard to make work: I found some new bugs in Unity’s EditorWindow implementation. Sigh)
- Everything is serialized correctly within the Unity Scene, using Unity Serialization