Language

Animator - what does "Can transition to self" do?

Could anyone please fill me in on what does the "Can transition to self" checkbox in animator state transitions actually do?

Because my situation is like this: I have an animator with a few states, each of them has a short animation. The thing is, when the checkbox for self-transition is checked, the animation does not play (stays frozen in the first frame):

But when I uncheck it, it plays correctly:

The weird thing is, that I have a different animator in the project, with pretty much the same setup (just different number of states and different animations associated with the states), and when I attach this animator to an animator controller, the animations play without a problem, even with the self-transition checkbox checked.

Could anyone enlighten me as to the purpose of this checkbox and why I am getting these inconsistent results?

1 Reply

@mahana21 If you do not disable transiting to self. On each update the condition for going from AnyState to your current state will be met, and the animation is rewinded over and over again so you can only see the first frame. You would avoid that by unchecking "Can Transition To Self" or changing you comparing values logic to Triggers (because trigger is cleared after getting conusmed, so the conditions for entering state are met only once and the animation can actually stay in that state instead of entering it over and over again).