fix: NetworkSceneManager does not synchronize despawned in-scene placed NetworkObjects [MTT-2924]#1898
Merged
NoelStephensUnity merged 71 commits intodevelopfrom May 9, 2022
Conversation
…-synchronize-late-joining-clients
ShadauxCat
reviewed
Apr 25, 2022
ShadauxCat
reviewed
Apr 25, 2022
ShadauxCat
approved these changes
Apr 25, 2022
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
This update allows for clients to load scenes and synchronize in-scene placed NetworkObjects during integration testing.
Now that clients are loading scenes, needed to make some minor adjustments.
Realized I don't need to simulate client loading delay unless the client is blocked from loading. Also had to adjust whether the metrics tests waited for the client or not when loading.
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
Went back through some of the changed files and removed some code no longer needed, extended some of the verbose debug info for any future debugging purposes, and updated some of the comments.
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
Contributor
|
Closed and re-opened to fix the JIRA association. Please make sure to add the JIRA ticket to the title upon PR creation in the future. |
…-synchronize-late-joining-clients
…-synchronize-late-joining-clients
0xFA11
approved these changes
May 9, 2022
…-synchronize-late-joining-clients
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves the issue where an in-scene placed NetworkObject could be despawned prior to a client joining and the client-side in-scene placed NetworkObject component's would not receive a despawn notification when synchronizing.
This also greatly reduces user pain by not requiring users to register in-scene placed NetworkObjets with the NetworkManager using prefab hash overrides. Instead, it just uses the table of in-scene NetworkObjects that were already being tracked by the NetworkSceneManager.
MTT-2924
Changelog
NetworkSceneManagerdoes not synchronize despawned in-scene placed NetworkObjects.NetworkManagerin order to respawn them. In-scene placed NetworkObjects are now automatically tracked during runtime and no longer need to be registered as a NetworkPrefab.Testing and Documentation
NetcodeIntegrationTest Updates:
The image above is an integration test that has two (2) clients and (1) host where the host loaded a scene that has in-scene placed NetworkObjects. If the in-scene NetworkObject has the TestHelper ObjectNameIdentifier component, then like in the above image you will be able to visually distinguish between each relative instance.