/p>
<pre><code class="lang-csharp">private void Start()
{
    _animator.Play(&quot;Idle&quot;).SetOnFrame(5, frame =&gt;
    {
        Debug.Log(&quot;Frame indexed as 5 played.&quot;);
    }).SetOnEnd(() =&gt;
    {
        Debug.Log(&quot;The animation ended.&quot;);
    });
}
</code></pre>
<div class="TIP">
<h5>Tip</h5>
<p>Chaining methods like this is a design pattern called <a href="https://en.wikipedia.org/wiki/Fluent_interface">Fluent Interface</a></p>
</div>
<h2 id="animationperformer-types">Animati