diff --git a/native/cocos/editor-support/spine/3.8/spine/AnimationState.cpp b/native/cocos/editor-support/spine/3.8/spine/AnimationState.cpp index b88b6a08fe1..379f6ee410e 100644 --- a/native/cocos/editor-support/spine/3.8/spine/AnimationState.cpp +++ b/native/cocos/editor-support/spine/3.8/spine/AnimationState.cpp @@ -472,6 +472,8 @@ bool AnimationState::apply(Skeleton &skeleton) { _events.clear(); current._nextAnimationLast = animationTime; current._nextTrackLast = current._trackTime; + + current._animationLast = current._nextAnimationLast; } int setupState = _unkeyedState + Setup; @@ -882,6 +884,8 @@ float AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBle from->_nextAnimationLast = animationTime; from->_nextTrackLast = from->_trackTime; + from->_animationLast = from->_nextAnimationLast; + return mix; } diff --git a/native/cocos/editor-support/spine/4.2/spine/AnimationState.cpp b/native/cocos/editor-support/spine/4.2/spine/AnimationState.cpp index 3ebaa94169c..5375a64e418 100644 --- a/native/cocos/editor-support/spine/4.2/spine/AnimationState.cpp +++ b/native/cocos/editor-support/spine/4.2/spine/AnimationState.cpp @@ -501,6 +501,8 @@ bool AnimationState::apply(Skeleton &skeleton) { _events.clear(); current._nextAnimationLast = animationTime; current._nextTrackLast = current._trackTime; + + current._animationLast = current._nextAnimationLast; } int setupState = _unkeyedState + Setup; @@ -909,6 +911,8 @@ float AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBle from->_nextAnimationLast = animationTime; from->_nextTrackLast = from->_trackTime; + from->_animationLast = from->_nextAnimationLast; + return mix; }