Topic was automatically imported from the old Question2Answer platform.
Asked By
Luftensteiner
In my main-scene I create some viewports with games in them.
I also save the games in a dictionary in the global-file.
When the games are over I want to show a Leaderboard-scene, but when I change the scene my viewports inclusive the games are empty.
You could try using an Autoload to store the necessary variables across scene changes.
I don’t know how you are changing scenes, but instead of replacing the entire scene you could have a root node that has a function to swap out child nodes to change the scene the user can view. In this way you wouldn’t “lose” all the scenes that were loaded because you would only be changing some of them.
For example, your scene tree may look like
- Root
- SomeNode
- World
- children
And you would swap out the children of World but keep other nodes loaded.