Question by
Delgh1 · Jun 14, 2017 at 09:53 PM ·
c#navmeshagent
How to make the navmesh agent accomplish one task per time?
I need a code that sets the destination of the navmesh agent to a point the player click on and, if there aren't any orders, to the nearest enemy. I created two functions : one that finds the position of the nearest enemy and one that find the point the player click on and they both work, but i can't make the code understand when the player's orders are accomplished/not given. Can someone give me some tips? Sorry for my poor engilsh.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612124210im_/https://answers.unity.com/themes/thub/images/avi.jpg)