I already bake a NavMesh but still got Error that said
“Setdestination can only be use on active agent that’s on Navmesh”
here is that picture to makesure that I already bake a Navmesh
Code*
public Transform target;
public NavMeshAgent agent;
// Use this for initialization
void Start () {
agent = GetComponent<NavMeshAgent>();
}
// Update is called once per frame
void Update () {
target = GameObject.Find ("Player").gameObject.transform;
agent.SetDestination (target.position);
}
}
Ty in advance