Steps to reproduce:
- Open the attached project and let it finish importing (Netcode for GameObjects 2.13.1 resolves via the manifest)
- Open the scene Assets/Scenes/SampleScene.unity (one "ReproHost" GameObject with the RuntimeSceneJoinRepro component; on Play it builds a NetworkManager + UnityTransport at 127.0.0.1:7777 in code - no other scene wiring)
- Enter Play mode and click the on-screen button "Start Host (creates the runtime scene)" - this starts a host and creates one empty additive runtime scene via SceneManager.CreateScene("RuntimeWorld")
- Duplicate the whole project folder on disk (e.g. to "ngorepro-client" next to it) - a second Editor cannot open the same folder & Open the duplicated folder in a second Editor
- In the second Editor, enter Play mode and click the on-screen button "Start Client (join 127.0.0.1:7777)"
- Observe the first (host) Editor's Console and the client's state
Actual results: The host throws during connection approval:
Exception: Scene '' couldn't be loaded because it has not been added to the build settings scenes in build list.
at Unity.Netcode.NetworkSceneManager.SceneHashFromNameOrPath (NetworkSceneManager.cs:790)
at Unity.Netcode.NetworkSceneManager.SynchronizeNetworkObjects (NetworkSceneManager.cs:2065)
at Unity.Netcode.NetworkConnectionManager.HandleConnectionApproval (NetworkConnectionManager.cs:1079)
at Unity.Netcode.ConnectionRequestMessage.Handle (ConnectionRequestMessage.cs:222)
The client stays connected (ConnectedClientsList count = 2) but its PlayerObject is null forever; no scene sync is
delivered and spawn never completes. Every subsequent join repeats it. The runtime scene contains NO NetworkObjects -
its mere existence breaks synchronization.
Expected results: Scenes created at runtime (empty scene.path, not in the build list, no NetworkObjects) are skipped during client
synchronization - or excludable via a public API - and the exception names the scene ("RuntimeWorld") instead of ''.
Reproducible with versions: 2.13.1 (6000.0.82f1, 6000.7.0a5)
Tested on (OS): Windows 11