Hi!
I’m having a strange issue with Netcode for GameObjects scene loading.
I’m using:
- Unity 6000.2.0b11
- Netcode for GameObjects 2.13.1
- Unity Transport
- Unity Multiplayer Services / Relay
- NetworkSceneManager for scene loading
I have a scene with multiple in-scene NetworkObjects. The objects are footprints that can later be cleaned by players.
The problem is reproducible based purely on the number of NetworkObjects in the scene:
- With around 10
NetworkObjects, the scene loads correctly for both Host and Client. - With around 20
NetworkObjects, the Host loads the scene successfully, but the Client does not even receiveSceneEventType.Load. - The Client therefore does not start loading the scene at all.
The scene is loaded by the Host with:
NetworkManager.Singleton.SceneManager.LoadScene(
sceneName,
LoadSceneMode.Single);
The returned status is:
SceneEventProgressStatus.Started
The Host successfully loads the Unity scene and the in-scene NetworkObjects are spawned. I can see Start() and OnNetworkSpawn() being called on the Host.
I also tried completely removing all logic from the Footprint component, including Start(), OnNetworkSpawn(), NetworkVariables, etc. The problem remains.
The Footprint component is essentially just:
public class Footprint : NetworkBehaviour
{
}
The only relevant component on the GameObject is NetworkObject.
Interestingly, if I disable the NetworkObject components on these objects, the same scene loads correctly on the Client.
There is also an important difference in OnLoadEventCompleted:
When the scene loads successfully for both Host and Client, this callback is invoked on the Host:
NetworkManager.Singleton.SceneManager.OnLoadEventCompleted
When there are enough in-scene NetworkObjects and the Client does not start loading, OnLoadEventCompleted is not invoked on the Host either.
So the sequence appears to be:
Working case:
Host calls NetworkSceneManager.LoadScene()
↓
Host loads the scene
↓
In-scene NetworkObjects are spawned
↓
Client receives SceneEventType.Load
↓
Client loads the scene
↓
OnLoadEventCompleted is invoked on Host
Failing case:
Host calls NetworkSceneManager.LoadScene()
↓
Host loads the scene
↓
In-scene NetworkObjects are spawned
↓
Client does NOT receive SceneEventType.Load
↓
OnLoadEventCompleted is NOT invoked on Host
I have verified that:
- The scene is included in Build Settings.
- The scene contains valid
NetworkObjects. - The issue is reproducible by changing only the number of in-scene
NetworkObjects. - Removing the
NetworkObjectcomponents makes the scene load correctly. - Removing all logic from the
NetworkBehaviourdoes not fix the issue.
Could there be some limit related to the number or size of in-scene NetworkObjects, scene object synchronization, message size, or Unity Transport?
Is there a recommended way to diagnose why the Host does not send the SceneEventType.Load event to the Client in this situation?
Any pointers on where in NetworkSceneManager / scene synchronization I should look would be greatly appreciated.
Thanks!
P.S. Additional observation:
I also tested the same objects using runtime spawning instead of placing them in the scene.
The Host loads the scene first, then spawns 20 Footprint NetworkObjects at runtime. Everything works correctly.
I then connect the Client after all 20 objects have already been spawned, and the Client successfully connects and synchronizes all of them.
So 20 NetworkObjects themselves do not seem to be the problem. The issue appears to be specifically related to having ~20 in-scene placed NetworkObjects during NetworkSceneManager.LoadScene() while the Client is already connected.
In other words:
- 20 runtime-spawned NetworkObjects → works.
- Client joins after 20 runtime-spawned NetworkObjects already exist → works.
- ~20 in-scene NetworkObjects during network scene loading → Client does not receive
SceneEventType.Load, andOnLoadEventCompletedis not invoked on the Host.









