I'm currently working on a dungeon crawler type of game (in Swift), and I would like to know how to preserve scenes when the game transfers between different scenes. I know how to save(encode) a scene and reload it. But what I'm trying to do is the for each level, the main dungeon has a few exits: A, B, C that connects to other smaller areas/sub-dungeon. In the effort of keeping the map relatively small, I have broken them into different scenes. And here is my question: How do I preserve these scenes when I transfer between them, meaning when I go back to a previously visited scene, all things stay the way how I left them (dead monsters stay dead and opened chests stay opened), instead of reloading a fresh scene. Any help would be appreciated!
Thanks in advance.