Skip to content

fix: PopulateScenePlacedObjects only checks IsSceneObject for null [MTT-3041] #1850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Mar 30, 2022

This fixes the issue when using a single scene containing both a NetworkManager and one or more in-scene placed NetworkObjects where a client could disconnect but not unload the scene and reconnect only to receive a soft synchronization error.
The fix is to check for both HasValue and Value being true in order to account for already previously instantiated NetworkObjects.

MTT-3041

Changelog

  • Fixed: in-scene placed NetworkObjects not being found/ignored after a client disconnects and then reconnects.

Testing and Documentation

  • includes a test to verify the changes

MTT-3041
This fixes the issue when using a single scene containing both a NetworkManager and one or more in-scene placed NetworkObjects where a client could disconnect but not unload the scene and reconnect only to receive a soft synchronization error.
The fix is to check for both HasValue and Value being true in order to account for already previously instantiated NetworkObjects.
MTT-3041 changelog update
cleaned up PopulateScenePlacedObjects for clarity.
reduce the networkObjectInstance.IsSceneObject check.
made PopulateScenePlacedObjects internal for testing purposes.
MTT-3041
This test verifies the changes made to PopulateScenePlacedObjects
Adding some comments
Copy link
Contributor

@JesseOlmer JesseOlmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I left 1 comment about the test case's focus/approach, but it's not a blocker.

NoelStephensUnity and others added 3 commits March 31, 2022 16:42
just spawning one of each type of simulated in-scene placed NetworkObject
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) March 31, 2022 23:11
@NoelStephensUnity NoelStephensUnity merged commit 9b54e1a into develop Mar 31, 2022
@NoelStephensUnity NoelStephensUnity deleted the fix/mtt-3041-populatesceneplacedobjects-sceneobject-check-logic branch March 31, 2022 23:32
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.

4 participants