bali33

Hi,

I'm playing 2 or 3 animations at the same times on a same SkeletonAnimation - is it possible to set the time scale for a specific animation instead of the whole SkeletonAnimation ?

Don't want to open another thread, so I asked another question here. How to set an animation to a specific time ? I tried to set the Spine.TrackEntry Time property but it didn't seem to work as expected.

Thanks
bali33
  • Postovi: 108

Pharan

Yes. When you call SetAnimation, it returns a TrackEntry object.
Each TrackEntry does have a TimeScale property: https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-csharp/src/AnimationState.cs#L271

So it could look like:
// Play the "foo" animation at 0.5 speed.
skeletonAnimation.state.SetAnimation(0, "foo", true).TimeScale = 0.5f;
Or you could store the TrackEntry reference and do other things with it.


Regarding .time
Time is always in seconds.
Avatar
Pharan
  • Postovi: 5366

bali33

Thanks !
bali33
  • Postovi: 108


Natrag na Unity