st been played&quot;);
    // Proceed to do stuff based on that frame.
}
</code></pre>
<p><strong>Listen for when a specific frame is played:</strong></p>
<p>In case you need to perform some routine when a specific frame plays, it is easy. Use the <code>SetOnFrame()</code> method:</p>
<pre><code class="lang-csharp">public void PlayShoot()
{
    _animator.Play(&quot;Shoot&quot;).SetOnFrame(2, frame =&gt;
    {
        Debug.Log(&quot;This is fired when the third frame is played.&quot;);
        Instantiate(_