Info
- The app always starts in the project's
RootScene (e.g. Assets/_Projects/<Project>/Scenes/RootScene.unity, made from the kit Settings/SceneTemplates/RootSceneTemplate). Content scenes are loaded additively on top of it over the network.
- Loading is async only. Scenes are referenced either directly (Build Settings) or as Addressables.
Flow
RootScene runs AppLoaderController (see App Loader). All managers load into the root scene.
NetworkStartLoader starts the network (mode from Polis/Network State toolbar in editor).
- Server start:
NetworkSceneManager loads its global scenes (the project's GlobalNetScene with the PurrNet PlayerSpawner).
- Client gets its player ID:
SceneSetupManager applies the home setup and joins its scenes. The loading overlay stays until this first setup is in or fails.
- Disconnect: current setup is cleared, player is teleported back to start.
Play in editor
- Toolbar button Polis/Play Root Scene (rocket icon,
LoaderEditorUtility.TryPlayRootScene()): saves, opens the root scene, plays, and reopens your previous scene after play.
- Root scene path is in
LoaderSettings (Assets/Settings/LoaderSettings.asset, Project Settings > App Loader). If missing, the button asks for it.
- Playing a content scene directly does not work, managers live in the root scene.
Adding a new content scene
- Create the scene and make it Addressable (content scenes are addressable, downloadable ones go into a remote group).
- Add an
ASceneSpawnPlace (e.g. ListSceneSpawnPlace).
- Create a
SceneSetupDefinition referencing it, apply the validator fix for its address and label.
- Set it as
DefaultSetup in the project's SceneSetupSettings, or add a selector / action to switch to it.
- Play with Polis/Play Root Scene.
Scene references