Connecting NavMesh Obstacles on a Map

Hi All,

This is my first posting on the forums although I’ve been an avid follower and Unity Dev for quite some time now. The reason for my posting is that I’ve hit a bit of a roadblock with something I’m trying to implement. I’m currently working on an isometric RTS game which will have a series of bases on a map and will be procedurally generated. From here, each base will be connected with at least one other base and depending on where the base lies, it could have more connections than that. When I say connect them, I mean to show some sort of visual indicator that shows they are connected and will want to eventually have these connections be only formed of straight lines and right angles (almost like connecting buildings with roads).

I’ve looked at both Unity’s NavMesh system which I will be using for my unit pathfinding, and also the A* Pathfinding Project on the asset store but just don’t know the best route to take for accomplishing something like this as it’s new territory for me. I’m not sure if this is something that can be done out of the box easily with Unity or will require a bit more custom code. Does anyone know how to accomplish something like this?

If the map itself is proc-gen, then UnityNav mesh is most likely not an option for you. It has to be “baked” at edit/compile time, and does not work with run-time generated terrain/maps/what-have-you.

FYI: the 5.6beta release of Unity contains API for building/updating NavMesh at runtime - for multiple agent sizes.
Components (and examples) are available here : https://github.com/Unity-Technologies/NavMeshComponents

Thanks for the heads up Jakob! I’ll give it a shot