Mecanim: Stop/Hold Animation at the end

So, I have a death animation where the character is standing, then falling to the ground.

I trigger this animation through a bool value set up in mecanim.

Now I want to play the death animation only once. After that I dont wan’t to blend in another animation. Actually I just want to stop at the last frame of the animation and hold it. Is there any easy way to this?

Regards

Make the death animation so that you cannot transition out of it and make sure it is non looping.

  1. Disable loop from import settings of the animation.
  2. Generate transition to the death animation
  3. Select transition → settings → “Can Transition to Self” set to false (unchecked)

If you want to pause a layer you could set that layer’s weight to 0

private var anim : Animator;

anim.SetLayerWeight(1, 0);