Save Scene data when changing scenes (Player position, alive enemies etc.)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DrSpyros

So, in my game I want to change to a different scene when somehting happens, the problem I am having is, whe nI change the scene and go back, everything goes back to default. Player is in starting location, the enemies respawned and other stuff

How can I change a scene without it reseting to default, like that scene is paused and not touched till player is back.

Help would help a lot :3

:bust_in_silhouette: Reply From: exuin

Use singletons to store data outside of the main scene.