Skip to content

Latest commit

 

History

History
130 lines (91 loc) · 4.22 KB

File metadata and controls

130 lines (91 loc) · 4.22 KB

Quick Start Guide

Get from zero to smooth scene transitions in minutes. Minimal code is needed only to define and emit signals; scene switching is handled automatically by the add-on.

✅ Prerequisites

  • Follow the Installation guide: enable SceneManager and build the solution
  • Godot 4.5 (Mono/.NET) with .NET SDK 8.0

1) Add signals to your scenes (C#)

Define signals on the root script of each scene that should trigger a transition. Emit them from UI or gameplay events.

Example: MainMenu.tscn root script

using Godot;

public partial class MainMenu : Control
{
    [Signal] public delegate void StartGameEventHandler();
    [Signal] public delegate void OpenSettingsEventHandler();

    public override void _Ready()
    {
        GetNode<Button>("%StartButton").Pressed += () => EmitSignal(SignalName.StartGame);
        GetNode<Button>("%SettingsButton").Pressed += () => EmitSignal(SignalName.OpenSettings);
    }
}

Example: GameLevel.tscn root script

using Godot;

public partial class GameLevel : Node
{
    [Signal] public delegate void PlayerDiedEventHandler();

    private void OnPlayerDeath()
    {
        EmitSignal(SignalName.PlayerDied);
    }
}

GDScript equivalents:

Example: MainMenu.tscn root script (GDScript)

extends Control

signal start_game
signal open_settings

func _ready():
    %StartButton.pressed.connect(func(): emit_signal("start_game"))
    %SettingsButton.pressed.connect(func(): emit_signal("open_settings"))

Example: GameLevel.tscn root script (GDScript)

extends Node

signal player_died

func _on_player_death():
    emit_signal("player_died")

Tip: After adding signals, build the solution (C#) or save the script (GDScript) so the editor can discover them.

2) Create your schema visually

  1. Open the Scene Manager main-screen tab

Scene Manager Editor tab

  1. Add a “Game start” node (created automatically in a new graph)
  2. Add a Scene Node for each .tscn you’ll use
  3. For each Scene Node:
    • Pick the .tscn with the resource picker
    • Click “Add Out slot” to add an outgoing transition trigger
    • Choose a signal from the dropdown (populated from your scene’s root script)
    • Optionally choose a transition from TransitionsLibrary and tweak Speed/Color
  4. Connect nodes by dragging from an out slot to a target node’s input
  5. Optional: Add a “Game quit” node to exit the game from a signal
  6. Save the schema (File > Save); the plugin updates SceneManagerSettings.tres automatically to point to it

Scene Manager Editor

3) Run the game

  • Press Play. The add-on loads the first scene from your “Game start” node and listens for your signals
  • When a configured signal is emitted, the Scene Manager switches to the connected scene using the selected transition

Note: You can keep any bootstrap Main Scene set in Project Settings. The ScenesManagerController autoload takes over at runtime and swaps to the configured first scene.

Example flow: Simple menu

Scenes:

  • MainMenu.tscn (signals: StartGame, OpenSettings)
  • GameLevel.tscn (signal: PlayerDied)
  • Settings.tscn (signal: Back)
  • GameOver.tscn (signal: ReturnToMenu)

Connections:

  • MainMenu → GameLevel on StartGame (Transition: cross_fade.tscn)
  • MainMenu → Settings on OpenSettings (Transition: Jump Cut = none)
  • Settings → MainMenu on Back (Transition: cross_fade.tscn)
  • GameLevel → GameOver on PlayerDied (Transition: diamond_fade.tscn)
  • GameOver → MainMenu on ReturnToMenu (Transition: cross_fade.tscn)

Save as res://SceneManagerSchemas/MainFlow.tres and run.

Tips

  • If a signal doesn’t appear in the dropdown, ensure it’s defined on the scene’s root script and rebuild the solution
  • Transition options come from res://addons/ScenesManager/TransitionsLibrary/ (use the filename, e.g., cross_fade.tscn)
  • Use Jump Cut by selecting “none” (no transition scene)
  • Keep schemas in res://SceneManagerSchemas/ for clarity (as in the demo)

Next steps