I upgraded to the latest version (v 3.4.0.5) and I can’t seem to get the recast results visualization to display (the colored diagonal lines on the navmesh). I can only get the navmesh outline to show up, like this in the sample scene ‘RecastExample’:
I found the diagonal lines a lot easier to visualize the results of the recast. Was this removed, or am I just missing how to turn it on?
I would also be interested by another visualization system. I’m a new user, so I never really saw the “diagonal lines” shader except on screenshots, but it seems quite convenient.
I have a temporary workaround for those of you interested: You can export the recast navmesh to a unity mesh and set up the material of your choice with the following C# code:
`
RecastGraph.NavmeshTile[] tiles = recastGraph.GetTiles ();
foreach (RecastGraph.NavmeshTile t in tiles)
{
Mesh mesh = new Mesh();
mesh.name = “tmpNavMesh”;
Vector3[] verts = new Vector3[t.verts.Length];
for (int j=0; j<verts.Length; j++)
verts[j] = (Vector3) t.verts[j];
mesh.vertices = verts;
mesh.triangles = t.tris;
GameObject go = new GameObject("tmpNavMesh");
go.AddComponent<MeshFilter>();
go.AddComponent<MeshRenderer>();
go.GetComponent<MeshFilter>().mesh = mesh;
go.renderer.material = (Material)Resources.Load ("Materials/navMesh");
}
`
where recastGraph is the recast graph of course. And you’ll need to have the material in the “Resources/Materials” folder. I use it in an editor script. Far from perfect or very elegant, but it does the trick for me!