- Home /
NavAgent not following on rebuilt NavMesh
This is for a school project and only needs to work in editor I understand there are better ways of doing this, but I'm interested in debugging this one specifically
I'm having a issue where the NavAgent won't follow the player character and I suspect it has to do with the NavMeshBuilder.BuildNavMesh();
function. I've done some testing and this is what I have come up with.
Generating NavMesh, with player character and NavAgent in scene works. I can rebuild the NavMesh and it will "hang" for a second or two and then continue to work. For these examples I have the script with the NavMeshBuilder.BuildNavMesh();
turned off.
When I procedurally generate the level, with the player and NavAgent in the level, and the script with the NavMeshBuilder.BuildNavMesh();
enabled, the NavAgent dosen't follow the character - but also throws no errors, or warnings. I haven't called the BuildNavMesh
yet. Once I do call the function, I can rebuild the NavMesh with no errors, or warnings.
Any help would be greatly appreciated. Let me know if I can post anything to help find the solution, thank you.
Your answer
Follow this Question
Related Questions
How to queue NavMeshAgents on entering a tile in Unity (based on path distance to tile)? 0 Answers
How to prevent NavMeshAgents from colliding when warped to same position? 0 Answers
How to make NavMeshAgents traverse two possible paths 1 Answer
NavMeshPath.corners.length is always 0 1 Answer
NavmeshAgent.remainingDistance remains at 0 but the agent still moves and behaves correctly 4 Answers