Unfortunately the way how SkeletonMecanim
applies animations is different from what AnimationState does in SkeletonAnimation
.
If you see the last animation being applied without end, you have disabled Advanced
Auto Reset
in the SkeletonMecanim
Inspector:
Auto Reset. When set to true, the skeleton state is mixed out to setup pose when an animation finishes, according to the animation's keyed items. This may be especially important when an animation has changed attachment visibility state: when mixed out, attachment visibility will change back to setup pose state, otherwise current attachment state is held until another animation has a key set at the respective attachment timeline.
If you see the animation ending, but the ending is too quick (an immediate cut), then you are encountering the following limitation of SkeletonMecanim
:
From the documentation here:
Required Additional Keys
To smoothly mix out a timeline state (e.g. bone rotation) from one animation to the next, the second animation requires an additional key at the first frame when in setup pose. Otherwise the previous animation would leave a leftover timeline state. This is one of the drawbacks of SkeletonMecanim compared to SkeletonAnimation.
So in order to mix out your animation, the following animation needs a key at the same timelines as the animation to be mixed out.