fix: NetworkAnimator rising RTT issue#2236
Merged
NoelStephensUnity merged 8 commits intodevelopfrom Oct 5, 2022
Merged
Conversation
jeffreyrainy
reviewed
Oct 5, 2022
jeffreyrainy
reviewed
Oct 5, 2022
jeffreyrainy
reviewed
Oct 5, 2022
jeffreyrainy
approved these changes
Oct 5, 2022
jakobbbb
pushed a commit
to GooseGirlGames/com.unity.netcode.gameobjects
that referenced
this pull request
Feb 22, 2023
* fix This fixes the issue where NetworkAnimator was not completely updated to the changes with AnimationMessage. NetworkAnimator will now only send states that have changed. Removed the check for AnimationMessage.AnimationStates being null as it will always be null when deserializing. Updated several comments for readability and clarity. * test adding additional checks to assure or AnimationStates list does not increase in size over time.
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 fixes the issue with the rising RTT values discovered when testing the develop branch with BossRoom and now the
NetworkAnimator.CheckForAnimatorChangesis no longer adding to the list but pulling from it, modifying, and then applying the modified AnimationState back to the same index position like theNetworkAnimator.ServerSynchronizeNewPlayermethod was doing. This includes a better approach to handling updating dirty states.The testing for this is a bit tricky, but I did add some modifications to the trigger test where it makes sure the AnimationStates list within the AnimationMessage was not increasing in size over time (a part of the RTT bug was it would add as opposed to apply the state for each AnimationState change detected).
MTT-4803
Testing and Documentation