Okay, I have a project I’m working on, here’s a basic outline:
Level 1: Main scene FPS. This is where the user will walk around opening doors moving objects ect.
Level 2: This runs when a object in Level 1 gets clicked on. When done, user is then returned to Level 1.
Now here’s the problem, when the user is returned to Level 1 all the doors objects get reset, in fact the whole scene is reset.
Is there any way to run a new Level without the reset?
Many thanks,
Shaun.
I’m a frayed knot; if level 2 is just some sort of mini-game or something like an inventory screen, you could load it with LoadSceneAdditive, but you’d have to manually script the level 2 scene to unload it’s own elements when returning to level 1.
If level 2 is actually another level, this approach won’t work at all - or rather, it will work, but by the last level you’d have every level in the game loaded into one scene, defeating the point of breaking it into scenes in the first place! You’ll need scripts that remember the states of any doors and movable objects whose states you want preserved, save them somehow, then load and re-apply those states when reloading the level. These would need to be stored persistently, either using something like PlayerPrefs, or to a file. If you search for “saving game states” you can probably find tutorials, plugins, and threads/questions to help you with that process.
Thanks, thought as much. Oh well, I guess running a game save wouldn’t be too hard.
Shaun.