animation.Crossfade behavior has changed between 2017 and 2020.x !

wow that’s a new one
i’ve been chasing my tail for an hour looking into my code for bugs when it was “just” another unity-special.
this time it’s crossfade, it used to auto rewind an animation (legacy) therefore allowing to replay the same anim over and over again
in 2020.x no such luck, now legacy keeps the last state and plays from there, which requires some magic tricks

i’m sure most of you drank the animator kool-aid (and broke a few teeth on the jar :smile:) so this won’t apply but for those dealing with old projects this will be useful info.

You might be interested in Animancer (link in my signature). The Playing and Fading example shows my solution to this problem, which is basically to just have it create another state to play the same animation when necessary so that the old state can fade out while the new state fades in.

I never really did much with animations in the Legacy system so I don’t know how easy it would be to achieve the same thing there, but I believe it does allow you to add animations at runtime so I would assume it’s at least possible.

1 Like

I ended up sprinkling Rewind and it worked.
Animancer is increasingly seductive as a layer of sanity, if I end up converting to animator I’ll use it.