I’ve baked my scene and get a NavMesh with HeightMesh. I wanna to export the navmesh and the heightmesh. But NavMesh.CalculateTriangulation.vertices do not contain vertices in heightmesh.
Any way to get these vertices ?
Any suggestion is appreciated.
My Unity Version: 5.3.4f1
Unity have no API to access height mesh, no way to do that.
No but you could use Unity - Scripting API: NavMeshBuilder to build it at runtime, and then make your own heightmesh.
Just loop through all the navmesh data and for each X Z position on the map place a number that says how high that position is.
Then turn those numbers to colors, white - black. Boom, height map generated manually (thats all a height map is underneath anyway, just a grayscale texture showing how high and low each area is).