Complete Pathfinding Understanding in Unity

Hello everyone,

As written on the title, I wanted to ask a guide way to my understanding. So my question is after I create a navmesh system in Unity, is there any way to access the nodes or points etc. data ? I want to write my own search algorithm without dealing with graph creating etc. I think Unity is using A star for pathfinding. I only want to focus writing my own search algorithm. Any other suggestions are gladly accepted. Thank you.

Unity uses a NavMesh. You should understand that navigating a navmesh (properly) is slightly more complex than navitaging a simple node tree. However you can get the mesh data of the navmesh by using NavMesh.CalculateTriangulation. Then you got the vertices, triangles and the area relation of each triangle. See NavMeshTriangulation for more details.

You can use A* for navigation, though the result probably needs to be “refined”, otherwise you would always follow the nav mesh edges. Here’s an article about how you may want to navigate a navmesh

So in that case it is possible to do with Unity Navmesh. A* is not an option for me to use but a guide. Due to an academic research using concrete algorithms are not allowed, I have to find a different approach it is not mandatory to be opitimal. If I am able to use the data of navmesh then even tough the motion etc. is not organic, I am ok with that. I searched a little bit and either people used a completely seperate approach such as Aron Grangberg’s or just Unity’s built in system. I am planning to make an hybrid (navmesh data from Unity , navigation from myself)