- Home /
Best approach for multiple scene states
I am making a 2D action-RPG, and it features multiple separate areas. For example, you can enter a shop inside a dungeon. Showing only the shop interior.
When leaving the shop again, I want the world outside, with all monster states and everything else, to be exactly as it was when you entered.
The cleanest approach would be to have two entirely different scenes in memory at once, both the dungeon and the shop, but from what I understand, Unity only allows one scene to be alive at the same time?
Another approach would be to let the shop exist in the same scene, but then I would need to manually somehow freeze time (aimation/physics/particles/scripts etc) in the dungeon while inside the shop. Or quickly loading and saving the dungeon state when going in and out from the shop, which seems complex.
What would the simplest approach be?
Answer by TonyLi · Nov 19, 2013 at 03:44 PM
Organize each "zone" (shop, dungeon, etc.) under a game object. When you want to pause a zone and make it disappear, deactivate the game object. It won't receive any Update() messages.
Your answer
Follow this Question
Related Questions
Game States, communication through scenes and objects 1 Answer
save level state by .. creating scene at runtime?! 0 Answers
How to Load a current level as back? 1 Answer
Save scene state 4 Answers