title: Unity animation plays twice
body: <p>I created a class called <code>AnimationController</code>, and I am having issues with it. When I press <code>space</code> it triggers the <code>Jump</code> animation in the <code>Animator</code> but it it plays twice. I can not figure out why it is doing this. What is a better way to deal with this?</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  [RequireComponent(typeof(Animator))]
  public class AnimationController : MonoBehaviour {
  
      Animator animator;
      AnimatorStateInfo baseLayer;
  
      void Start() {
          animator = GetComponent&lt;Animator&gt;();
          baseLayer = animator.GetCurrentAnimatorStateInfo(0);
      }
  
      void Update () {
          if(Input.GetButton("Jump") &amp;&amp; !baseLayer.IsName("Jump")) {
              animator.SetTrigger("Jump");
          }
  
      }
  }
  </code></pre>