Hi, fairly new to unity and spine, so I think I'm missing something essential.
Here's the problem:
I attach an animation to my skeleton. The animation, done in spine, is a mixture of a tween (ie just setting translation keyframes in the timeline) and a frameByFrame animation (ie just turning on different attachments in a slot)
I want to be able to reset the animation, so whenever i click reset, it jumps to frame 1 of the animation.
I tried various methods like the following and these: http://esotericsoftware.com/forum/Reset-Track-animation-9783?p=44268&hilit=reset+animation#p44268, but all yield the same result:
var t = skeletonAnimation.AnimationState.Tracks.First();
var animation = t.animation;
skeletonAnimation.AnimationState.SetEmptyAnimation (t.TrackIndex, 0f);
skeletonAnimation.timeScale = 0f;
skeletonAnimation.AnimationState.SetAnimation (t.TrackIndex, animation, true);
What I don't understand is:
The frameByFrame animation resets to frame 1, but the the tweened animation maintains it's current position (rotation or scale). Even though, all the tweened animations start with a keyframe, clearly setting the starting position.
Any help much appreciated.