• 中文
  • 我想要从某一帧开始循环播放,但是播放完成一次后又从0开始循环

  • Изменено
Related Discussions
...

I want to play a animation from special frame for loop then play from the first frame for loop.
Here is my code.

public void OnSpineAnimationStart(TrackEntry trackEntry)
    {
        // Add your implementation code here to react to start events
        trackEntry.AnimationStart = (float)startFrame / FIXED_FPS;
        trackEntry.AnimationLast = (float)startFrame / FIXED_FPS;
    }
 public void OnSpineAnimationComplete(TrackEntry trackEntry)
    {
        // Add your implementation code here to react to complete events
        trackEntry.AnimationStart = 0;
        trackEntry.AnimationLast = -1;
            
animationState.Complete -= OnSpineAnimationComplete; }

It always loop plays from the special frame???


When I first load scene,OnSpineAnimatonStart doesn't trigger????


I resolute it.I still don't know what does trackEntry.AnimationLast means?Could you explain it to me?


And I want to set AnimationTime to 0 for reset when GameObject Enable...It's readonly


Ok I set TrackTime instead explain trackEntry.AnimationLast to me please!!

10 дней спустя

Sorry for the late reply! I was on vacation last week and just returned.

Please check out the official API documentation page below:
TrackEntry animationLast