Changing Scenes
Changing Scenes
Godot has multiple ways to change the scene. The most common way is to use change_scene_to_packed or change_scene_to_file method.
Usage of change_scene_to_packed:
Usage of change_scene_to_file:
More complex scene changing
When you want to keep Player or some other game data between scenes you can
use previously mentioned methods with Godot autoload system.
Another system is to have Game node that is always present in the scene tree.
Create a node tree like this:
Then add a script to Game node and add this code to it:
Now when you want to change a level just call next_level function in Game node.
