I’ve got a really simple animator controller. There are two states. “Talking” and “Not Talking.” Think character portrait.
I can’t seem to use “Any State” properly. Here’s what the graph looks like.
Exit
Entry → “Not Talking”
Any State -(if state == 1)> “Talking”
Any State -(if state == 0> “Not Talking”
With this setup, if I set the state = 1; the animation will not play UNLESS I set the transition to say “Has Exit State.”
If I stop using Any State, everything works as expected. The issue is, I’d like to be able to use Any State since I plan to have many more states and I don’t have a crazy n-to-n graph.
That’s pretty strange and sounds like a bug, though Animator Controllers are pretty convoluted so there could be something else causing the issue.
If you don’t actually need to customise the duration of each transition, you could simply remove them all and call CrossFade(“State Name”, transitionDuration) without using a parameter at all.
You might also be interested in Animancer (link in my signature) which lets you avoid the need for Animator Controllers entirely. You can just get an AnimationClip and play it without messing around with states/parameters/transitions.
Ah ok, that works for me. Maybe it’s a bug :(. Thanks for the cross fade tip!