Hello,
I am facing inconsistencies in animation playing between the Editor and Unity.
In the following example, we have a character with two tracks. The base track is always looping the Idle animation, above it is an animation of holding a sword.
When a key is pressed, the upper track plays a Sword Hit animation, and then goes back to Holding.
As shown in the videos, the Unity runtime has glitches after the Hit animation that are not apparent in the Spine Editor (videos are at 20% time scale):
https://streamable.com/af38gz
https://streamable.com/k54x4j
Spine file:
https://we.tl/t-stzQF8klsn
Here is the code:
private void Start ()
{
spine.AnimationState.SetAnimation(0, "Idle/E", true);
spine.AnimationState.SetAnimation(1, "Hold/E", true);
}
private void Update ()
{
if ( Input.GetKeyDown(KeyCode.Space) )
{
spine.AnimationState.SetAnimation(1, "Hit/E", false);
spine.AnimationState.AddAnimation(1, "Hold/E", true, 0);
}
}
Thank you,
Danielle