menu_bookDocumentation

Scene.Load and Scene.LoadFromFile: Loading Scenes, DontDestroyOnLoad, and the Loading Sequence

calendar_today May 4, 2026 schedule ~1 min read person patrickjr verified 50

Scene.Load and Scene.LoadFromFile: Loading Scenes Locally

Scene.Load loads a scene file into the current scene. This is a local-only operation — it does not bring other clients to the new scene. Use Game.ChangeScene for multiplayer scene changes.

Loading a Scene

CSHARP
// Load by filename
Scene.LoadFromFile( "scenes/myscene.scene" );

// Load from a SceneFile resource
Scene.Load( mySceneFile );

// Load with options
var options = new SceneLoadOptions();
options.SetScene( "scenes/myscene.scene" );
options.IsAdditive = true; // don't clear existing objects
Scene.Load( options );

SceneLoadOptions

| Property | Default | Description | |---|---|---| | IsAdditive | false | If true, don't clear existing objects before loading | | ShowLoadingScreen | true | Show the loading screen during load | | DeleteEverything | false | If false, objects with DontDestroyOnLoad survive | | IsSystemScene | false | Marks this as the system scene (loaded additively with every scene) |

DontDestroyOnLoad

GameObjects with the DontDestroyOnLoad flag survive non-additive scene loads. They are moved to the scene root before the clear:
CSHARP
myGameObject.Flags |= GameObjectFlags.DontDestroyOnLoad;

Loading Sequence

  1. ISceneLoadingEvents.BeforeLoad fires
  2. Scene is cleared (unless additive)
  3. GameObjects are deserialized
  4. ISceneLoadingEvents.OnLoad tasks are awaited
  5. NavMesh is generated (if enabled)
  6. ISceneLoadingEvents.AfterLoad fires
  7. GameObjectSystem.Stage.SceneLoaded signal fires
  8. SceneNetworkSystem.OnLoadedScene is called (allows players to join)

System Scene

Every scene can have a "system scene" that is additively loaded alongside it. This is configured in project settings (SystemScene). Set WantsSystemScene = false on a scene to skip it (e.g., for menu scenes).
Was this helpful?