Build a game with multiple levels, a title screen, and values (health, score) that carry between scenes. Two components do the work: GameSceneManager loads scenes and positions the player, and a simple checkbox keeps values alive across loads.
Multi-scene games in EGTK use two types of scene. A bootstrap scene holds your player, managers, and UI — everything that needs to survive. Level scenes contain only the level content — geometry, collectibles, enemies, triggers.
Six steps to go from a single scene to a multi-level game.
Bootstrap (or Title). This scene will be the one in Build Settings at index 0 — it is always the first scene Unity loads. Move your player and any managers you want to survive into it.SceneManager. Add the GameSceneManager component. Leave Use Additive Loading checked (default). Leave Unload Previous Scene checked. These defaults are correct for almost every game.Level1. Add your level geometry here. Do not add a player or a camera rig — the player from the bootstrap scene will move into this level automatically.SpawnPoint. Add the SpawnPoint component. Leave Is Default Spawn Point checked. Position it where the player should appear when entering the level. A green gizmo shows the exact spawn position in the Scene view.Bootstrap first (index 0), then Level1. Every scene you want to load must appear in this list. The name shown in Build Settings is the string you pass to LoadScene().SceneManager object. Choose GameSceneManager → LoadScene(string). Type Level1 in the string field. Press Play from the bootstrap scene and trigger it — Level1 loads in, the player is repositioned to the SpawnPoint.LoadScene("Level1") must match the scene filename exactly, including capitalisation, with no path or .unity extension. If the scene isn't in Build Settings, Unity logs an error and onSceneLoadFailed fires.EGTK handles value persistence automatically — no extra setup needed beyond checking a box on each manager. The underlying system is completely invisible.
The defaults work for most games. The events let you attach transitions, progress bars, or audio cues to the load cycle.
| Field | Default | What it does |
|---|---|---|
| Use Additive Loading | true | Keeps the bootstrap scene alive while loading the level scene on top. Recommended — leave this on. |
| Unload Previous Scene | true | Automatically unloads the previous level when loading a new one. Leave on unless you need both levels loaded simultaneously. |
| Pre Load Delay | 0 | Seconds to wait after triggering a load before anything happens. Use this to let a fade-out animation finish before the scene changes. |
| Post Load Delay | 0 | Seconds to wait after loading completes before firing onSceneLoadCompleted. Use this to hold a black screen before fading in. |
| Event | When it fires |
|---|---|
| onSceneLoadStarted | As soon as loading begins. Wire to a fade-out or loading screen activation. |
| onSceneLoadCompleted | Once the scene is fully loaded and active. Wire to a fade-in or to call CharacterControllerCC.CheckForSpawnPoint() if using additive loading with a pre-existing player. |
| onSceneLoadFailed | If the scene name doesn't exist in Build Settings. Wire to an error message or fallback. |
| onLoadProgress (float) | Fires continuously during load, passing 0→1. Wire to a fill bar's SetFillAmount to show a progress bar. |
| Method | What it does |
|---|---|
| LoadScene(string) | Load a scene by name. Player spawns at the default SpawnPoint. |
| LoadSceneAtSpawnPoint(string, string) | Load a scene and spawn at a specific SpawnPoint ID. Use when entering from different doors. |
| LoadSceneSingle(string) | Load a scene replacing all current scenes (non-additive). Use for returning to the main menu. |
| ReloadCurrentScene() | Reload the current level scene. Wire to game-over restart logic. |
Each level scene should have at least one SpawnPoint. Add more if the level has multiple entry points (e.g. entering from the left door vs. the right door).
| Field | Default | What it does |
|---|---|---|
| Spawn Id | "" | Optional name for this spawn point. Set this if the level has multiple entry points and you want to choose between them using LoadSceneAtSpawnPoint(). |
| Is Default Spawn Point | true | If checked, this is used when LoadScene() is called with no specific ID. Only one SpawnPoint per scene should be the default. |
| Spawn Offset | 0,0,0 | Offset from the SpawnPoint's position. Useful for placing the spawn point on the ground while the visual marker sits at head height. A yellow line in the Scene view shows the offset. |
| onPlayerSpawned | Fires when the player spawns here. Wire to a door-close animation or a room-reveal effect. | |
InputTriggerZone to an exit area. In On Enter: drag the SceneManager object → GameSceneManager → LoadScene(string) → type Level2. The player walks through and Level2 loads seamlessly.LoadSceneSingle(string) instead of LoadScene(). This replaces all loaded scenes, which destroys the bootstrap scene and returns to a clean state. Wire it to a "Quit to Menu" button in your pause menu.GameHealthManager → onDeath to GameSceneManager → ReloadCurrentScene(). The current level is unloaded and reloaded, repositioning the player at the SpawnPoint. Health starts fresh from the manager's default (since the death triggered the value to be 0 before reloading — set Max Health as the Inspector default to ensure a full reset).south-entrance. On the trigger for the second door, use GameSceneManager → LoadSceneAtSpawnPoint(string, string) → scene name: Level2, spawn point id: south-entrance. The player spawns at that specific point.0.5), and wire onSceneLoadStarted to trigger the fade-out animation.