- Home /
Two active Scenes?
I'm making a game where the player can switch between planet view and solar system view (kind of like SimEarth and Populus/Black and White). How exactly would I go about accomplishing this? Can I have my tribe continue on as normal when I'm off planet. Also, if I hurl asteroids at the planet in space, can I have it alter the planet once I go back into Planet View? Not sure if it's possible or not. I would think that I can do this, because of games like Fallout where the player leaves the open world to go into a building, and when he exits again, everything was as they left it.
Answer by Fattie · Dec 09, 2012 at 11:59 AM
right, it's common to have a scene where you have "two stages" if you will, and just swap between the cameras.
let me explain - imagine a boxing game, so you have the boxers, ring etc.
now "off to the side" -- like you can see it in your unity editor! -- there is a whole other reality. perhaps, it could be some system of machines doing something, whatever.
for some reason in the game, you SWAP BETWEEN those two totally different "happenings" -- but actually it's indeed the SAME UNITY "SCENE".
I was actually just working on a scene that as a "diagramattic view" of something, and a "typical 3D view". in the user's interface it swaps between the two you know? but actually it's really funny if you see it in the editor, it's like these two totally separate realities sitting side by side
it is also common to have "another 'scene' " inside your scene, to use for things like on-screen controls and so on. sometimes the "map" in the corner is a whole other 'stage' playing out which sits off to one side of the actual racegame or whatever it is. (in this case TBC both cameras are shown at the same time to the user - you are talking about CHANGING CAMERAS so that the user sees two different 'scenes' even though it's actually the same 'Unity Scene" )
note that some really complicated and subtle rigs are done like this,
http://answers.unity3d.com/questions/299407/character-collision-of-walls-inside-moving-ship.html
OR ... be aware that often you can actually swap, pretty quickly, between "unity scenes"
particularly if you're a smart arse about assets that don't get reloaded between scenes, etc. (look in to that technology)
i encourage you to do some test on how fast you can swap unity scenes, if you use dont destroy on load judiciously (which is fiddly, though)
Awesome, thank you. So as I understand it, 1) have both scenes together in the same scene, but just far enough to where the cameras could never see the other scene and just enable/disable accordingly and 2) if I use dontDestroyOnLoad where I need it, then theoretically, the scene would continue where I left off? Is that correct?
(1) that is all totally, competely correct ! (note that the "layers" concept, camera and/or physics, can be useful here. but generally speaking you've got it.)
next, pls "TIC$$anonymous$$" any helpful answers, to close out the question! only you can do it
(2) using DontDestroyOnLoad is basically difficult. it takes a lot of experience. I urge you to (a) give it a go a couple times (b) search for questions on here related and (c) do not hesitate to ask a NEW separate question regarding DontDestroyOnLoad and similar issues. everyone will be pleased to answer such new questions, cheers
Your answer
![](https://koobas.hobune.stream/wayback/20220613085200im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Warp Shader? 1 Answer
How to set up a world map texture on a series of individual country meshes? 1 Answer
Asset that can achieve a sonic game 4 Answers
Get position of the centre of each grid tile 1 Answer
MMORPG Scripting Ideas 1 Answer