Is their a way to restart the entire game as if it was just opened?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: 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?

:bust_in_silhouette: Reply From: dewcked

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.

:bust_in_silhouette: Reply From: Calinou

Restarting an entire project isn’t possible yet, but there’s a pull request that exposes the editor’s restart-on-exit functionality to projects.