詳見官網文件:
http://esotericsoftware.com/spine-using-runtimes#Animation-changes
An animation only affects the bones and slots for which it has keyframes.
When animations are applied in sequence, a previous animation may have made changes to bones or slots that a subsequent animation does not have keyframes for.
This can be solved be keying everything at the start of the second animation that the first animation affects.
文件有提到對每個Track打上key是會造成額外的運算負擔,但若是增加的幅度很小,其實也可以無視了。
With many animations this quickly leads to everything being keyed at the start of every animation. This is suboptimal because each property that is keyed adds a small amount of overhead when the animation is applied each frame.
文件也提出第二種解決方式,就是歸回SetupPose,但造成的負面影響是動作可能會發生不順暢、無法crossfading的狀況。
Another solution is to call setToSetupPose, setBonesToSetupPose, or setSlotsToSetupPose on the skeleton when the current animation is changed (or otherwise write code that changes the slots and bones as needed).
However, this will cause bones that aren't keyed in the second animation to be instantly set to the setup pose state. AnimationState won't be able to do crossfading for those bones.