Skip to content

fix: NetworkAnimator destinationStateMachine exception [MTT-5083] #2309

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

Merged

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Nov 14, 2022

This resolves the issue where NetworkAnimator was not checking for AnimatorStateTtansition.destinationStateMachine, which was causing an exception, and adding any possible states with triggers defined within it. This also prevents the server from sending itself messages about animation state changing (#2305).

MTT-5083
MTT-5122

GitHub Issues Resolved:
#2305
#2293
#2374
#2366
#2368

Changelog

  • Fixed: NetworkAnimator issue where it was not checking for AnimatorStateTtansition.destinationStateMachine and any possible sub-states defined within it.
  • Fixed: NetworkAnimator issue where the host client was receiving the ClientRpc animation updates when the host was the owner.
  • Fixed: NetworkAnimator issue with using pooled objects and when specific properties are cleaned during despawn and destroy.
  • Fixed: issue where NetworkAnimator was checking for animation changes when the associated NetworkObject was not spawned.

Testing and Documentation

  • Includes integration test updates.
  • Includes manual test updates.

This fixes the issue where NetworkAnimator was not taking into consideration `AnimatorStateTtansition.destinationStateMachine`.  Now, NetworkAnimator parses each destinationStateMachine's states for trigger transitions and includes those in the transition table.
passing setTrigger bool to internal method.
Manual test that validates this fix.
Only send animation updates to clients and not host client when animation state changes.
MTT-5083
Updating test to validate states defined within a destinationStateMachine are triggering.
MTT-5083
Adding entry for this fix.
MTT-5083
Adding the PR number to the changelog entry.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review November 14, 2022 20:45
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner November 14, 2022 20:45
jeffreyrainy
jeffreyrainy previously approved these changes Nov 15, 2022
Copy link
Contributor

@jeffreyrainy jeffreyrainy left a comment

Choose a reason for hiding this comment

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

.

Copy link
Contributor

@jeffreyrainy jeffreyrainy left a comment

Choose a reason for hiding this comment

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

.

Copy link
Contributor

@jeffreyrainy jeffreyrainy left a comment

Choose a reason for hiding this comment

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

Mistakenly approved wrong PR, please wait for actual review before acting on this approval.

@jeffreyrainy jeffreyrainy dismissed their stale review November 16, 2022 01:06

approval was by mistake 🤷

This includes some updates to NetworkAnimator that will remove the need to synchronize client's using RPCs but instead use the new OnSynchronize method.

Fixed an issue with using pooled objects and when specific properties are cleaned during despawn and destroy.
Made components visible to testproject again although I might try to figure out a better way to handle these two ways of testing.
Updated the NetworkAnimatorTests to acquire the state info from NetworkAnimator.SynchronizationStateInfo.
NoelStephensUnity and others added 9 commits November 20, 2022 13:40
Making the NGO Components AssemblyInfo adjustment only expose internals if NGO_COMPONENTS_ASSEMBLY_RUNTIME_VISIBILITY is defined.
Removed enabling verbose debug in LateJoinSynchronizationTest
Adjusting to original serialized format for backwards compatibility.
removed the AnimationSynchronizationData class as it really was not needed.
This fixes the issue where NetworkAnimator will not check for animation changes unless the associated NetworkObject is spawned.
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) December 12, 2022 17:14
lpmaurice
lpmaurice previously approved these changes Dec 14, 2022
Removing the NGO_COMPONENTS_ASSEMBLY_RUNTIME_VISIBILITY from the scriptingDefineSymbols.
Replacing it with UNITY_INCLUDE_TESTS in the components AssemblyInfo.cs file.
Adding an additional remark about the context of when CheckForAnimatorChanges is invoked.
NoelStephensUnity and others added 3 commits January 10, 2023 11:01
Migrating all test related assemblies within the UNITY_INCLUDE_TESTS define region.
Minor fix for weapon attack option in manual test.
updating what was fixed in this PR
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.

5 participants