I have a script from Dungeon Architect that basically draws Gizmo lines along all connections between neighboring waypoints, which is nice. However, I'd like to draw a secondary line the follow the lowest cost path on the NavMesh between two points (in the scene view as a gizmo, preferably). There's a sample I'm trying to work from here:


However, if I debug through it, path never gets any values. I created agents on the objects at the two points, thinking maybe that would make a difference (I'm not sure why I thought that). Does this script need to be attached to one of those points? With a NavAgent? Or am I missing something completely obvious?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.