Code snippet - this is performed on a SkeletonAnimation that has no other animations playing or anything else going on with it:
if (Input.GetKeyDown(KeyCode.I)) {
skeletonAnimation.AnimationState.AddAnimation(0, "animation_name", false, 0);
skeletonAnimation.AnimationState.AddEmptyAnimation(0, 0, 0);
}
What I expect to happen: I press the "i" key, and it plays the full 1 second long "animation_name" animation, and when it finishes the empty animation clears the track.
What I actually happens: I press the "i" key, and it plays the "animation_name" animation for a single frame, and then switches to the empty animation and gets cleared. If the "mixDuration" on the empty animation is set to 0 then the Track goes back to "null" after 2 frames (one frame of "animation_name" and one frame of "<empty>")
Am I misunderstanding how AddEmptyAnimation is supposed to work? I assumed it would queue the empty animation after the "animation_name".
Notes:
-I'm using the latest version of Spine 3.8