For anyone else encountering similar problems:
This is Spine's current non-resetting behavior.
It doesn't assume you want animations to look like they do in Spine editor, because sometimes people want to mix animations and have different animations control different parts of the body, or have programmatic control over some parts of skeletons. Auto-resetting isn't incompatible with these intentions, but it does require you to handle them on a case-by-case basis.
However, if you DO want animations to look like they do in Spine editor, and don't really need complicated animation mixing and bone control setups, you can define auto-reset behavior.
The basic solution is to subscribe to Spine.AnimationState's events. Particularly, the Start
event is helpful.
In C#, this closure is enough for most cases:
var mySkeleton = mySkeletonAnimation.skeleton;
mySkeletonAnimation.state.Start += delegate { mySkeleton.SetToSetupPose(); };
@SullyTheStrange's solution is an example of a more customized solution, where you can define a custom "reset pose" as a zero-length Spine.Animation in the editor and key only the things you want to reset.
The solution here (in C#) is to call this whenever you want a reset to happen:
//.Apply method signature:
//Spine.Animation.Apply(Skeleton skeleton, float lastTime, float time, bool loop, List<Event> events)
myResetPoseAnimation.Apply(mySkeleton, 0, 0, false, null);
and if it's actually what you want, you could combine these two solutions and say:
mySkeletonAnimation.state.Start += delegate {
myResetPoseAnimation.Apply(mySkeleton, 0, 0, false, null);
};
To be clear: It's NOT recommended that you key everything that needs to reset at the start of every animation you have. This has a real potential to be both computationally expensive at runtime, and very very tedious when you're editing and animating the skeleton. Such a solution would involve either (a) keeping track of only the bone transform properties/slots/draw order states that you want to reset, and then adding a reset key to the n number of animations you have whenever you change or add something new, or (b) blindly keying all bones, slots and draw order in all animations which is the worst for runtime performance and project setup. In both cases, the reset keys incur a cost not only at the beginning but the entire duration of each animation. Not to mention they would make your project messy by adding lots of entries in the dopesheet that don't actually do anything.