Don’t use the names of existing types as namespaces. You have a custom namespace here:
namespace UnityStandardAssets.Characters.ThirdPerson.NavMeshAgent
So anything within that namespace (or in code which references the enclosing namespace) which refers to NavMeshAgent
will be referring to the namespace. Not to the type in Unity.
Rename your namespace. For example:
namespace UnityStandardAssets.Characters.ThirdPerson.MyNavMeshAgent
(Or something more contextually meaningful.)
Basically the lesson here is that names matter. The names of your namespaces, types, variables, etc. should be clear and unambiguous to both you and to the compiler.
And, of course, to reference that type directly you’ll need a using
directive:
using UnityEngine.AI;
solved I don’t know how to do