Today I have a demand that I have a animation clip named Happy and a animation clip named speak. Want to achieve when the protagonist wins after the play dynamic sequence:
Happy->speak->happy->speak->, .....
Such an infinite loop.
After some detours, we find that it can be done directly in animator state machine, such as:
Transition{idle->happy} on condition set to Triggerwin, because idle to happy transition can not too procrastination, so has Exit time to remove the tick.
Transition{happy->speak} on condition set to empty, has Exit time can be preserved, in addition to adjust the excessive.
Transition{speak->happy} on condition is set to empty, has Exit time can be preserved. In addition, the adjustment is too good.
So as long as the victory when the call Animator.settrigger ("Triggerwin"), you can see the following animation sequence playback effect:
Idle->happy->speak->happy->speak->happy->speak->, .....
And the animations are over-band.
Unity5, animator state machine, unconditional transition to play animation sequences