How do I stop a 2D animation on the last frame?

I have an animation that is triggered by a button, but when it’s over, it goes back to the first frame - I want it to stay on the last. Unchecking the Loop box does nothing.
Thank you!

What you’re looking for is to change the animation clip’s WrapMode from Once (the default, which wraps back to the beginning once playback is finished) to Clamp Forever (which stays on the last frame after playback finished).

The way to do it is to:

  1. Select the Animation Clip asset in the Project window
  2. switch the Inspector into Debug Mode
    193873-debuginspector.jpg
  3. Click on the Dropdown besides m_WrapMode and select Clamp Forever
    193874-inkedanimmodes-li.jpg