@@ -1183,9 +1183,11 @@ private void OnClientUnloadScene(uint sceneEventId)
11831183 SceneManagerHandler . MoveObjectsFromSceneToDontDestroyOnLoad ( ref networkManager , scene ) ;
11841184
11851185 m_IsSceneEventActive = true ;
1186- var sceneEventProgress = new SceneEventProgress ( m_NetworkManager ) ;
1187- sceneEventProgress . SceneEventId = sceneEventData . SceneEventId ;
1188- sceneEventProgress . OnSceneEventCompleted = OnSceneUnloaded ;
1186+ var sceneEventProgress = new SceneEventProgress ( m_NetworkManager )
1187+ {
1188+ SceneEventId = sceneEventData . SceneEventId ,
1189+ OnSceneEventCompleted = OnSceneUnloaded
1190+ } ;
11891191 var sceneUnload = SceneManagerHandler . UnloadSceneAsync ( scene , sceneEventProgress ) ;
11901192
11911193 SceneManagerHandler . StopTrackingScene ( sceneHandle , sceneName , m_NetworkManager ) ;
@@ -1286,9 +1288,11 @@ internal void UnloadAdditivelyLoadedScenes(uint sceneEventId)
12861288 // Validate the scene as well as ignore the DDOL (which will have a negative buildIndex)
12871289 if ( currentActiveScene . name != keyHandleEntry . Value . name && keyHandleEntry . Value . buildIndex >= 0 )
12881290 {
1289- var sceneEventProgress = new SceneEventProgress ( m_NetworkManager ) ;
1290- sceneEventProgress . SceneEventId = sceneEventId ;
1291- sceneEventProgress . OnSceneEventCompleted = EmptySceneUnloadedOperation ;
1291+ var sceneEventProgress = new SceneEventProgress ( m_NetworkManager )
1292+ {
1293+ SceneEventId = sceneEventId ,
1294+ OnSceneEventCompleted = EmptySceneUnloadedOperation
1295+ } ;
12921296 var sceneUnload = SceneManagerHandler . UnloadSceneAsync ( keyHandleEntry . Value , sceneEventProgress ) ;
12931297 SceneUnloadEventHandler . RegisterScene ( this , keyHandleEntry . Value , LoadSceneMode . Additive , sceneUnload ) ;
12941298 }
@@ -1523,9 +1527,11 @@ private void OnClientSceneLoadingEvent(uint sceneEventId)
15231527 SceneUnloadEventHandler . RegisterScene ( this , SceneManager . GetActiveScene ( ) , LoadSceneMode . Single ) ;
15241528
15251529 }
1526- var sceneEventProgress = new SceneEventProgress ( m_NetworkManager ) ;
1527- sceneEventProgress . SceneEventId = sceneEventId ;
1528- sceneEventProgress . OnSceneEventCompleted = OnSceneLoaded ;
1530+ var sceneEventProgress = new SceneEventProgress ( m_NetworkManager )
1531+ {
1532+ SceneEventId = sceneEventId ,
1533+ OnSceneEventCompleted = OnSceneLoaded
1534+ } ;
15291535 var sceneLoad = SceneManagerHandler . LoadSceneAsync ( sceneName , sceneEventData . LoadSceneMode , sceneEventProgress ) ;
15301536
15311537 OnSceneEvent ? . Invoke ( new SceneEvent ( )
@@ -1834,9 +1840,11 @@ private void OnClientBeginSync(uint sceneEventId)
18341840 if ( ! shouldPassThrough )
18351841 {
18361842 // If not, then load the scene
1837- var sceneEventProgress = new SceneEventProgress ( m_NetworkManager ) ;
1838- sceneEventProgress . SceneEventId = sceneEventId ;
1839- sceneEventProgress . OnSceneEventCompleted = ClientLoadedSynchronization ;
1843+ var sceneEventProgress = new SceneEventProgress ( m_NetworkManager )
1844+ {
1845+ SceneEventId = sceneEventId ,
1846+ OnSceneEventCompleted = ClientLoadedSynchronization
1847+ } ;
18401848 sceneLoad = SceneManagerHandler . LoadSceneAsync ( sceneName , loadSceneMode , sceneEventProgress ) ;
18411849
18421850 // Notify local client that a scene load has begun
0 commit comments