Sure, but put it back to what attachment? 🙂 The easiest solution is to call setSlotsToSetupPose
when changing the animation. Alternatively or additionally, you could set the attachment for the slots you want to reset. Eg, if your character can have many different swords and attachment changes are keyed in the animation, setSlotsToSetupPose
is probably not what you want and you would explicitly set the sword the player has equipped.
If you are using mix times, the AttachmentTimeline of the animation you are mixing from may change attachments after you have changed the animation and reset the attachments. This post describes one solution to that problem:
One Frame Attachment Animations
This issue tracks the problem (#12) and a number of other use cases and improvements we have planned:
[runtimes] AnimationState improvements · Issue #621 · EsotericSoftware/spine-runtimes · GitHub