I'm making a Zelda perspective game in Unity with tk2d runtime, I'm using 4 different skeletons for left, right, up, down. I have animations for each direction which are all corresponding eg: walk_down, walk_left, raise_shield_left, raise_shield_right, etc. So what I'm trying to do is when the character changes direction (and the skeleton is changed) I want the animation to continue instead of just immediately stopping and showing the default pose. For example if the player has their shield raised, and they change direction I want it to look like the shield is in the same place; as opposed to having the raise shield animation play again from the beginning. I figured all I had to do was on direction change set the correct animation and manually set the time to whatever it was at before. (I also tried just copying over the track data completely and changing the names, as opposed to just time and animation but I had similar problems).
So this is what I do:
When a change in direction is detected:
-Copy the time and animation name from the track data (using two tracks at the minute, 0 for movement, 1 for combat)
-Set skeleton to the new direction skeleton, state.ClearTracks()
-For each track: set the animation to the same animation but for the new direction, using SetAnimation() and set the state.GetCurrent(trackNo).time to trackList[trackNo].time
That should achieve what I'm trying to do shouldn't it? What I'm getting is loads of animationNotFound errors, but the animation names that show as not found are the correct ones for the current skeleton, which is a bit strange. For example I can see on screen the skeleton has clearly changed to "facing_down_skeleton", but it tells me the animation "walk_down" is not found.
I've went through the code and the skeleton has definitely changed and the names are correct, so am I doing this wrong/missing something or must there be some issue elsewhere in my code?