add m_SkeletonAnimation.Update(0);
fix when Application Playing spine show not correct bug 2019.8.13
public void UpdateClip(PlaySpineAnimationClip clip, float time, float previousTime, float weight){
if (spineComponent != null){
// baseWeight = activeClips == 2? 0 : 1 - weight;
// clip.clipAnimation.Apply(skeleton, 0, time, true, null, weight, Spine.MixPose.Current, Spine.MixDirection.In);
// clip.clipAnimation.Mix(skeleton, 0, time, true, null, weight);
//fix spine 3.6 mix bug 2018.9.16 //by boboshu
if( m_SkeletonAnimation == null)
m_SkeletonAnimation = spineComponent as SkeletonAnimation;
var toAnimation = clip.clipAnimation;
// Approximate what AnimationState might do at runtime.
if (activeClips > 1 && fromAnimation != null) {
skeleton.SetToSetupPose();
fromAnimation.Apply(skeleton, 0, fromtime, true, null, fromWeight, MixPose.Setup, MixDirection.Out);
toAnimation.Apply(skeleton, 0, time, true, null, weight, MixPose.Current, MixDirection.In);
}
else {
skeleton.SetToSetupPose();
toAnimation.PoseSkeleton(skeleton, time, true);
}
//fix when Application Playing spine show not correct bug 2019.8.13
if (m_SkeletonAnimation != null)
m_SkeletonAnimation.Update(0);
fromAnimation = clip.clipAnimation;
fromtime = time;
fromWeight = weight;
}