I’m still very new to Unity and I have just baked a NavMesh for my terrain yet when I try to create movement script for a generic enemy type, it does not give me the option to create a NavMeshAgent variable. I have attached two pics that show the problem. Am i not declaring it correctly or could there be another issue?
A few things.
- It is Capital “N” Public NavMeshAgent variableNavMeshAgent;
- Have you added a NavMeshAgent component to your character GameObject?
- You likely want to define it outside of the Start routine so all routines can access it. (i.e. between the Class and the Void Start() lines
- Initialize it in the Start routine with variableNavMeshAgent = GetComponent ();
- then in update perform the actions you want on the variableNavMeshAgent

