- Home /
Animator stops working after updating to 5.6
Hello. In Select Player scene of my project, I change characters by loading runtime animator controller from Resources (code below). It worked fine in 5.5.
void UpdateSelectPlayer () {
playerAnimator.runtimeAnimatorController = Resources.Load<AnimatorOverrideController> ("PlayerSelectPlayerAnimators/" + firstLetter + secondLetter + thirdLetter);
mapAnimator.runtimeAnimatorController = Resources.Load<AnimatorOverrideController> ("MapAnimators/" + forthLetter);
}
But after updating to 5.6, animator doesn't work anymore. The problem is when I select a new character, the sprites showing on screen is still of the old character and animation freezes. However I see in the Inspector that animator controller changed to the animator override controller of the new character I select correctly. And when I select the old character, animator works (animation happens) again.
I already checked by selecting a random character when the scene started by script. Animator of the first selected character always works no matter which character it randomly selects. The problem happens again when I select others that's not first selected when starting the scene.
I'm really not sure what happens. This select character is quite a big features for me and I spent a long time implementing. Thanks for any help.
Answer by CrazyBits · Apr 04, 2017 at 05:02 AM
Same problem here, haven't figured out a solution but this may help approaching one: the new runtime controller "starts" working as soon as a transition is triggered. The problem is that, with more complex animators, you don't really want to/have the chance of getting a "dummy" transition triggered. Still working on this.
Answer by engrato · Jul 27, 2017 at 01:42 AM
As from 5.6.2, this issue is solved. At least, it was solved for me.
From the changelog, "Animation: Fixed an issue where using an override controller multiple times would not animate correctly. (910194)".