how to run the second animation after the first animation finish

Im new in unity. i dunno how to run the 2nd animation after the first animation is done.
for example; when we press button on mouse, animation will raised flag(1st animation). after lifting the flag, he will wiggle the flag(2nd animation).

if (Input.GetMouseButtonDown (0)) {

anim.SetInteger ("State", 1); //after this animation is done(raised flag is done)
anim.SetInteger ("State", 2); //run this animation(wiggle the flag)

}

Sorry for my bad english. and thanks before :slight_smile:

Follow those three steps like in figure below. Select last frame of your animation and click button [1.], than click icon [2.] and in inspector you can call function that raises flag. Note that script that has function you want to call and animator must be placed in same Game Object! Hope that helps