Getting this error:
NullReferenceException: Object reference not set to an instance of an object
RPG.Combat.Fighter.Update() (at Assets/Scripts/Combat/Fighter.cs:23)
I saw a couple of people mention this error and the solution was to add the Action Scheduler script to the Enemy, which I have done, and this error still presents itself. My code for my line 23 is below.
if (!GetIsInRange())
{
GetComponent<Mover>().MoveTo(target.transform.position);
}
And just for good measure, here is the MoveTo() function from the Mover.cs
public void MoveTo(Vector3 destination)
{
navMeshAgent.destination = destination;
navMeshAgent.isStopped = false;
}