title: Unity not playing full animation and only playing segments
body: <p>I was working on a game in unity, and I needed some animations so I made this script:</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class Sword : MonoBehaviour
  {
      Animator m_animator;
      
      void Start()
      {
          m_animator = GetComponent&lt;Animator&gt;();
      }
      
      void Update()
      {
              if(Input.GetKey(KeyCode.W))
              {
                  m_animator.ResetTrigger(&quot;Chop&quot;);
                  m_animator.ResetTrigger(&quot;Idle&quot;);
                  m_animator.SetTrigger(&quot;Run&quot;);
              }
              else if(Input.GetKey(KeyCode.A))
              {
                  m_animator.ResetTrigger(&quot;Chop&quot;);
                  m_animator.ResetTrigger(&quot;Idle&quot;);
                  m_animator.SetTrigger(&quot;Run&quot;);
              }
              else if(Input.GetKey(KeyCode.S))
              {
                  m_animator.ResetTrigger(&quot;Chop&quot;);
                  m_animator.ResetTrigger(&quot;Idle&quot;);
                  m_animator.SetTrigger(&quot;Run&quot;);
              }
              else if(Input.GetKey(KeyCode.D))
              {
                  m_animator.ResetTrigger(&quot;Chop&quot;);
                  m_animator.ResetTrigger(&quot;Idle&quot;);
                  m_animator.SetTrigger(&quot;Run&quot;);
              }
              else if(Input.GetKey(KeyCode.Space))
              {
                  m_animator.ResetTrigger(&quot;Chop&quot;);
                  m_animator.ResetTrigger(&quot;Idle&quot;);
                  m_animator.SetTrigger(&quot;Run&quot;);
              }
              else if(Input.GetMouseButton(0))
              {
                  m_animator.ResetTrigger(&quot;Run&quot;);
                  m_animator.ResetTrigger(&quot;Idle&quot;);
                  m_animator.SetTrigger(&quot;Chop&quot;);
              }
              else
              {
                  m_animator.ResetTrigger(&quot;Run&quot;);
                  m_animator.ResetTrigger(&quot;Chop&quot;);
                  m_animator.SetTrigger(&quot;Idle&quot;);
              }
          }
  
  }
  </code></pre>
  <p>It works, but it only plays a little bit of the animation before cutting and either restarting the animation, or going onto another one. How can that be fixed?</p>