void OnEnable()
{
roamPoints = GameObject.FindGameObjectsWithTag(“Roaming Point”);
navAgent = GetComponet();
state = State.Roaming;
}
you written GetComponet… instead of GetComponent();
The message is fairly obvious.
GetComponet
doesn’t exist, in any Unity context.
You meant to type GetComponent
. Furthermore, GetComponent()
doesn’t mean anything, you need to pass a type.
navAgent = GetComponent<NavMeshAgent>();