NavMeshAgent SetDestination not working

I’m getting the error “SetDestination” can only be called on an active agent that has been placed on a NavMesh (it’s called from update and the error repeats every frame in the console). The character just walks in circles and the navigation no longer works, sometimes. It seems as though the error description is incorrect/misleading or there’s a bug with nav. I’ve attached a screen shot showing that the Nav Mesh Agent is in fact enabled, and the character is in fact on a baked nav mesh (I’ve also tried slightly raising and lowering the char, no luck). Anyone have any ideas on how to fix this, and/or what’s causing the problem?

Good day.

Sometimes, Navmesh agents semms to be in a navmesh area, but they are not, you need then to move the nav mesh agent to the navmesh using:

to be sure it is “connected” to the nav mesh area.


I’ve had a similar issue. The problem was that I was not using the Default “Humanoid” Agent type. Try changing it back to the default “Humanoid” and see if that works.

I think you may forget to assign nav mesh agent…it might be null…show your coding…how you get navmesh agent in code