File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
com.unity.netcode.gameobjects/Runtime/Messaging/Messages Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -366,21 +366,18 @@ public void Handle(ref NetworkContext context)
366366
367367 if ( ! networkManager . SceneManager . IsRestoringSession )
368368 {
369- // Synchronize the service with the initial session owner's loaded scenes and spawned objects
370- networkManager . SceneManager . SynchronizeNetworkObjects ( NetworkManager . ServerClientId , true ) ;
371-
372369 // Spawn any in-scene placed NetworkObjects
373370 networkManager . SpawnManager . ServerSpawnSceneObjectsOnStartSweep ( ) ;
374371
372+ // Synchronize the service with the initial session owner's loaded scenes and spawned objects
373+ networkManager . SceneManager . SynchronizeNetworkObjects ( NetworkManager . ServerClientId , true ) ;
374+
375375 // Spawn the local player of the session owner
376376 if ( networkManager . AutoSpawnPlayerPrefabClientSide )
377377 {
378378 networkManager . ConnectionManager . CreateAndSpawnPlayer ( OwnerClientId ) ;
379379 }
380380
381- // Synchronize the service with the initial session owner's loaded scenes and spawned objects
382- networkManager . SceneManager . SynchronizeNetworkObjects ( NetworkManager . ServerClientId , true ) ;
383-
384381 // With scene management enabled and since the session owner doesn't send a scene event synchronize to itself,
385382 // we need to notify the session owner that everything should be synchronized/spawned at this time.
386383 networkManager . SpawnManager . NotifyNetworkObjectsSynchronized ( ) ;
You can’t perform that action at this time.
0 commit comments