I’m trying to highlight a NavMeshAgent’s path for debugging, but from the documentation there doesn’t seem to be a way to access it, as though it’s private with no accessors. Is there no way to get at it? Should I just calculate a path to it’s current destination and operate on that? If that’s the answer, how do I access the scene’s NavMesh in code so that I can call CalculatePath?
You call .SetDestination on your agent and it’ll just move there by itself, You can grab a path from the NavMesh and call SetPath on the agent as well.
I found something akin to the script reference here :
http://www.unity3dhelp.com/ScriptReference/NavMeshAgent.html
And
http://www.unity3dhelp.com/ScriptReference/NavMesh.html
Good luck!