Skip to content

Commit 01aea75

Browse files
fix
Clean up scene migration synchronization table when NetworkManager shuts down.
1 parent 8f8fd06 commit 01aea75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,10 @@ internal void ShutdownInternal()
16651665
// can unsubscribe from tick updates and such.
16661666
NetworkTimeSystem?.Shutdown();
16671667
NetworkTickSystem = null;
1668+
1669+
// In the event any exceptions occurred and objects are destroyed prior to being despawned,
1670+
// clear out the NetworkObject scene migration synchronization table and removal list.
1671+
NetworkObject.CleanNetworkObjectSynchronization();
16681672
}
16691673

16701674

0 commit comments

Comments
 (0)