qq526843006

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!!
qq526843006
  • 帖子: 7

Harald

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
头像
Harald

Harri
  • 帖子: 4174


回到 中国Spine用户