How to get shown navmesh data from navmeshsurface?

I have been working on a custom navigation solution for my project where I take the triangulation from Unitys navmesh.

NavMeshTriangulation navmesh = NavMesh.CalculateTriangulation();

Everything works but once I began testing and fixing vertical navigation I noticed that the visual didn’t match. First I thought that there were a bug in my code but then found that the result from the CalculateTriangulation won’t return data equal to what is shown in the editor when viewing the baked navmesh from the navmeshsurface.

Looking online I can’t find any way to get the shown navmesh data but also that the questions and answers were a few years old, and that the difference between the shown and the calculated is that the calculated doesn’t need as much height information.

Is there a way to get the data of the navmesh shown when baking using navmeshsurface?

Not sure if this helps much, but in my experience with nav meshes, there is often issues that arise from objects being one single surface, especially if you made them without probuilder or outside unity.

Only other thing that comes to mind is that CalculateTriangulation isn’t exactly well made and has some sort of limitations when trying to use it. Maybe do some research into how CalculateTriangulation() actually outputs data, or try extracting the actual points it’s using to find a cause.

Good luck