File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Packages/com.unity.multiplayer.samples.coop/Utilities/SceneManagement Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,7 @@ public AsyncOperation LocalLoadOperation
5050 /// </summary>
5151 public float LocalProgress
5252 {
53- get => IsSpawned && ProgressTrackers . ContainsKey ( NetworkManager . LocalClientId ) ?
54- ProgressTrackers [ NetworkManager . LocalClientId ] . Progress . Value : m_LocalProgress ;
53+ get => IsSpawned && ProgressTrackers . ContainsKey ( NetworkManager . LocalClientId ) ? ProgressTrackers [ NetworkManager . LocalClientId ] . Progress . Value : m_LocalProgress ;
5554 private set
5655 {
5756 if ( IsSpawned && ProgressTrackers . ContainsKey ( NetworkManager . LocalClientId ) && ProgressTrackers [ NetworkManager . LocalClientId ] . IsSpawned )
@@ -72,12 +71,14 @@ public override void OnNetworkSpawn()
7271 NetworkManager . OnConnectionEvent += OnConnectionEvent ;
7372 }
7473 }
74+
7575 public override void OnNetworkDespawn ( )
7676 {
7777 if ( IsServer )
7878 {
7979 NetworkManager . OnConnectionEvent -= OnConnectionEvent ;
8080 }
81+
8182 ProgressTrackers . Clear ( ) ;
8283 onTrackersUpdated ? . Invoke ( ) ;
8384 }
@@ -117,9 +118,10 @@ void ClientUpdateTrackersRpc()
117118 }
118119 }
119120 }
121+
120122 onTrackersUpdated ? . Invoke ( ) ;
121123 }
122-
124+
123125 void OnConnectionEvent ( NetworkManager networkManager , ConnectionEventData connectionEventData )
124126 {
125127 if ( IsServer )
You can’t perform that action at this time.
0 commit comments