com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
fix: NetworkAnimator Synchronizing transition twice [MTT-3564]
This fixes an issue where a trigger activated transition would be synchronized twice:
- Once when the trigger was set
- Once when the NetworkAnimator detected the animation state change Since transitions can also be triggered by other parameters and by the end of the previous animation state and since NetworkAnimator does not have (currently) a way to associate a trigger with a transition, we send an additional "Transition" flag in the AnimationMessage so clients can determine if they are already transitioning and ignore that particular AnimationMessage while also preserving the functionality of "chained states" that transition at the end of each state's animation time.
Changelog
- Fixed
NetworkAnimatorsynchronizing transitions twice due to it detecting the change in animation state once a transition is started by a trigger.
Testing and Documentation
- Includes updates to TriggerUpdateTests to validate this fix.
- Includes updates to LateJoinSynchronizationTest to adjust for this fix.
@fernando-cortez since you filed the original bug can you confirm this resolves your issue acceptably?