Scene Manager
The Scene Manager handles loading, transitioning, and navigating between scenes without boilerplate.
Loading a Scene
Section titled “Loading a Scene”await SceneManager.LoadAsync("res://scenes/MainMenu.tscn");Transitions
Section titled “Transitions”await SceneManager.LoadAsync("res://scenes/Game.tscn", transition: Transition.Fade);History
Section titled “History”Navigate back to the previous scene:
await SceneManager.Back();Preloading
Section titled “Preloading”Preload a scene in the background so the transition is instant when triggered:
SceneManager.Preload("res://scenes/Boss.tscn");
// later...await SceneManager.LoadAsync("res://scenes/Boss.tscn"); // no wait