com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

fix: NetworkAnimator Synchronizing transition twice [MTT-3564]

Open NoelStephensUnity opened this issue 3 years ago • 1 comments

This fixes an issue where a trigger activated transition would be synchronized twice:

  1. Once when the trigger was set
  2. 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.

MTT-3564

Changelog

  • Fixed NetworkAnimator synchronizing 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.

NoelStephensUnity avatar Jul 28 '22 02:07 NoelStephensUnity

@fernando-cortez since you filed the original bug can you confirm this resolves your issue acceptably?

JesseOlmer avatar Aug 09 '22 17:08 JesseOlmer