Topic was automatically imported from the old Question2Answer platform.
Asked By
Paar
Hi! I’m experimenting with a Godot and am at a point where I want to restart the whole game by calling get_tree().reload_current_scene() but whenever I do that, all previously instantiated scenes remain in the tree and cause problems. Tried change_scene() but that had the same effect. I probably don’t understand how the reloading works but there is no explanation in the official docs, or at least none that I could find.
What is the best way to restart the game so it behaves like it’s been opened for the first time? Thanks for any advice!
Alright, I know what’s going on. I have mistaken the get_tree().root for a method that returns the topmost node in the project tree, but it is not obviously. Right now I’m adding all node instances to the root and they’re sibling nodes to the main node, that’s why they stay there even after reloading the current scene.