I'm trying to play two animation clips sequentially using Unity 2D. I've been using Mecanim for this so I've imported the two clips in a newly created controller and connected the first one to the next one. I also want the last clip to be looping so I set that toggle in the settings of the clip.
Now for some reason the first clip is played just fine but the second one doesn't animate at runtime. It loops fine in the Animator window and the clip itself works in the preview window but not at runtime.

I've also tried setting it up using the Animation Component and use the PlayQueued method but this doesn't give any animation.

I'm kind of lost on what to try next

EDIT: This is to be used on a Canvas UI Image


You can just setup a transition between the two animations like so:

enter image description here

So in this above example, once the RedBlink animation is done playing once, it will automatically start playing RedAngry animation.

Make sure to only set the Loop Time on the animation that you want to loop.

enter image description here

  • \$\begingroup\$ Unity man :D (Y) \$\endgroup\$ Feb 25 '16 at 14:56
  • \$\begingroup\$ BTW I never tried this like this, if it really works then good answer bro \$\endgroup\$ Feb 25 '16 at 14:58
  • \$\begingroup\$ @HamzaHasan Really? Maybe you should reply with your method. It would be interesting to see how you do it. \$\endgroup\$
    – jgallant
    Feb 25 '16 at 14:59
  • \$\begingroup\$ @Jon I tried this and it gives me the same result. The first clip plays just fine and the second one goes into the loop but the animation on the screen seems to stop at the last frame of the first clip (+ see edit, I need this to work on a Canvas UI Image) \$\endgroup\$
    – Dries
    Feb 25 '16 at 15:01
  • \$\begingroup\$ @Dries Are you sure that second animation is not bugged? Can you play it manually? \$\endgroup\$
    – jgallant
    Feb 25 '16 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.