Skip to content

Conversation

@NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Feb 7, 2025

The PR assures that:

  • If a NetworkObject's GameObject is destroyed before it should have been, this is detected and the scene migration synchronization table is cleaned up.
  • When NetworkManager shutsdown the scene migration synchronization table is cleared.

MTTB-1025
MTTB-1027

This PR also removes the static NetworkObjectsToSynchronizeSceneChanges table and migrates this script into NetworkSpawnManager.

fix: #3221, #3218

Changelog

  • 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.
  • Fixed: Issue where the scene migration synchronization table was not cleaned up upon NetworkManager shutting down.

Testing and Documentation

  • Includes integration test updates to NetworkObjectDestroyTests and NetworkSceneManagerEventDataPoolTest.
  • No documentation changes or additions were necessary.

Clean up scene migration synchronization table entry when GameObject is destroyed when it should not have been.
Clean up scene migration synchronization table when NetworkManager shuts down.
adding check for any in-scene placed NetworkObjects.
removing whenever destroyed (if entry still exists).
Minor test to validate the NetworkObject is no longer within the NetworkObject.NetworkObjectsToSynchronizeSceneChanges list upon destroying it prior to it being despawned.
Adding change log entries.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review February 9, 2025 18:16
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner February 9, 2025 18:16
Removing static NetworkObjectsToSynchronizeSceneChanges and CleanUpDisposedObjects and migrating them to normal properties within the NetworkSpawnManager.
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.
Fixing issue with logic for scene migration synchronization.
switching from a list to a stack
Had to adjust for the changes from static to NetworkManager relative (for DA mode).
@NoelStephensUnity NoelStephensUnity merged commit 6c46dfd into develop-2.0.0 Feb 12, 2025
27 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/NetworkObjectsToSynchronizeSceneChanges-edge-cases branch February 12, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants