Godot games are composed of scenes, whether it's levels or your main menu or whatever, and you'll need to switch between them as your player interacts with the game. There are a few different ways to switch scenes in Godot with code. This video goes through some easy ways and then the more advanced, recommended way to go about scene switching.
Source code: [ Ссылка ]
Examples from Godot Skeleton: [ Ссылка ]
Godot docs on a global scene switcher: [ Ссылка ]
Godot docs on quickly switching scenes: [ Ссылка ]
If you want to maintain game data across scenes, I'd recommend using a Singleton Autoload with variables. That'll let you store things like score, inventory, etc. across scenes.
Donate as a way to say thank you: [ Ссылка ]
Check out my games: [ Ссылка ]
Subscribe to my newsletter: [ Ссылка ]
Chapters
00:00 - Intro
01:36 - Switching Scenes with change_scene_to_file()
03:40 - Remote Debug
04:12 - More Simple Scene Switching
05:53 - Switching Scenes with change_scene_to_packed()
08:25 - Singleton Scene Switcher
15:07 - Outro
#Godot #GrowingWithGodot #Godot4 #GodotEngine
![](https://i.ytimg.com/vi/RMdf60IAxY0/maxresdefault.jpg)