title: I can't get the enemy to follow the player in unity
body: <p>The enemy goes to the player at first then stops and doesn't move.
  The chasePlayer function is being run every frame so the enemy should update its destination every frame but this is not happening, it does it in the first instance then when it reached the first destination stops an doesn't go to the player anymore.
  How can I fix this?</p>
  
  <pre class="lang-c# prettyprint-override"><code>public class Slime : MonoBehaviour, IEnemy {
      public Transform enemyTarget;
      public float maxHealth, power, toughness;
      public float currentHealth;
  
      private NavMeshAgent navAgent;
      private Player player;
  
      void Start() {
          navAgent = GetComponent&lt;NavMeshAgent&gt; ();
          currentHealth = maxHealth;
      }
  
      void Update() {
          ChasePlayer();
      }
  
  //Makes enemy chases player
      void ChasePlayer() {
          this.player = player;
          navAgent.SetDestination(enemyTarget.position);
          Debug.Log ("Chasing player");
      }
  }
  </code></pre>