To play an animation without crossfading, you can set the mix duration between animations to zero. This will prevent any blending and will immediately switch from one animation to the next. You can achieve this by setting the mix duration in your AnimationStateData
:
AnimationStateData data = spineAnimationState.Data;
data.SetMix(runWestAnimationName, runEastAnimationName, 0);
data.SetMix(runEastAnimationName, runWestAnimationName, 0);
This configuration ensures that when you switch between the runWestAnimationName
and runEastAnimationName
, there will be no crossfade, and the transition will be instantaneous.