Hi,
I've been using Spine + Unity for 2 years now and after upgrading to the latest Runtime and Spine versions, my scripts' Set and AddAnimation Behaviour is completely bugged.
Before, I would be able to do this:
exampleSkeleton.state.SetAnimation(0, "walk", false);
exampleSkeleton.state.AddAnimation(0, "loop-stuff", true, 0.0f);
This would play the "walk" animation and after it completed, play the "loop-stuff" animation on loop.
After the changes of the new Spine & Runtime to "AnimationState" etc. this seems to have changed.
The first animation plays correctly but the "AddAnimation" call mixes back to the Setup-Pose, which is SUPER weird and completely bugs 50% of my game.
I then read about your changes to AnimationState and, what bewilders me: This seems to be intentional? Or did I read this wrong:
https://github.com/EsotericSoftware/spine-runtimes/issues/621
- Mix unkeyed properties to/from setup pose:
track 0, animation 1, keys a
track 0, animation 2, keys b
Result: a is left in the state it was when the animation changed, b snaps into position.
Expected: a mixes back to the setup pose, b mixes from the setup pose.
Solution: Need a TrackEntry setting for animations to mix to/from the setup pose during mixing.
There is only some edge cases where I would WANT this to happen.. so is this a bug on my part? Did I not understand something fundamental? Or is this indeed a change to the system, and if so, how can I use AddAnimation the way it used to work so I can fix my game?
Thank you very much! :handshake:
EDIT: I have now read that this is, indeed, intentional. Don't really understand the benefits yet as this brought way more problems to my project than it solved so far, but anyway:
How do I (in Unity) Set an Animation on e.g. track 0 and then Add an animation that LOOPS on the same track to play after the first? Right now, the second animation does NOT loop and glitches back to the setup pose..any way to prevent that? Why doesn't it loop?