You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: network objects to synchronize scene changes edge cases (#3230)
* fix
Clean up scene migration synchronization table entry when GameObject is destroyed when it should not have been.
* fix
Clean up scene migration synchronization table when NetworkManager shuts down.
* fix
adding check for any in-scene placed NetworkObjects.
removing whenever destroyed (if entry still exists).
* test
Minor test to validate the NetworkObject is no longer within the NetworkObject.NetworkObjectsToSynchronizeSceneChanges list upon destroying it prior to it being despawned.
* update
Adding change log entries.
* fix
Removing static NetworkObjectsToSynchronizeSceneChanges and CleanUpDisposedObjects and migrating them to normal properties within the NetworkSpawnManager.
* test
Adding a validation at the end of the scene load-unload test to assure the NetworkObjectsToSynchronizeSceneChanges has no remaining in-scene placed NetworkObjects when all scenes are unloaded.
Removing a verbose setting from InScenePlacedNetworkObjectTests.
* fix
Fixing issue with logic for scene migration synchronization.
* update
switching from a list to a stack
* test
Had to adjust for the changes from static to NetworkManager relative (for DA mode).
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
13
13
### Fixed
14
14
15
15
- Fixed exception being thrown when a `GameObject` with an associated `NetworkTransform` is disabled. (#3243)
16
+
- Fixed issue where the scene migration synchronization table was not cleaned up if the `GameObject` of a `NetworkObject` is destroyed before it should have been. (#3230)
17
+
- Fixed issue where the scene migration synchronization table was not cleaned up upon `NetworkManager` shutting down. (#3230)
16
18
- Fixed `NetworkObject.DeferDespawn` to respect the `DestroyGameObject` parameter. (#3219)
17
19
- Fixed issue where a `NetworkObject` with nested `NetworkTransform` components of varying authority modes was not being taken into consideration and would break both the initial `NetworkTransform` synchronization and fail to properly handle synchronized state updates of the nested `NetworkTransform` components. (#3209)
18
20
- Fixed issue with distributing parented children that have the distributable and/or transferrable permissions set and have the same owner as the root parent, that has the distributable permission set, were not being distributed to the same client upon the owning client disconnecting when using a distributed authority network topology. (#3203)
AssertOnTimeout($"Not all expected logs were received when destroying a {nameof(NetworkObject)} on the client side during an active session!");
135
142
}
143
+
if(m_DistributedAuthority)
144
+
{
145
+
Assert.IsFalse(m_ClientNetworkManagers[1].SpawnManager.NetworkObjectsToSynchronizeSceneChanges.ContainsKey(m_ClientNetworkObjectId),$"Player object {m_ClientNetworkObjectId} still exists within {nameof(NetworkSpawnManager.NetworkObjectsToSynchronizeSceneChanges)}!");
146
+
}
147
+
else
148
+
{
149
+
Assert.IsFalse(m_ClientNetworkManagers[0].SpawnManager.NetworkObjectsToSynchronizeSceneChanges.ContainsKey(m_ClientNetworkObjectId),$"Player object {m_ClientNetworkObjectId} still exists within {nameof(NetworkSpawnManager.NetworkObjectsToSynchronizeSceneChanges)}!");
0 commit comments