Topic was automatically imported from the old Question2Answer platform.
Asked By
Merlin1846
I would like to restart the ENTIRE game, similar to how Rimworld does it when you change the mod list. Now Rimworld probably just restarts the content loading part of the game but I would like to restart the ENTIRE game, not the scene. I would also like to do this without the use of external scripts that start the game when run. Does anyone know if this is possible?
Restarting game is possible with remove_child(Node) and Scene.queue_free()ing every scene you instanced then Scene.instance() and add_child(Node). If this is not enough, call initializers in every Scene automatically. You can put initializers in the _ready() functions. For those global variables that imported with autoloads, just call initializer in their scripts.