Penalties do not work for NavMeshGraph

Hi! It seems that Penalties do not work for NavMeshGraph (from Meshes).

I took “GameUpdateScene” object from “PenaltiesExample” scene and copy-pasted in into “NavmeshExample” to mark one of detours of wall as tag-1 with penalty. I put penalties both on tag-1 in A* settings and on Player’s tags penalties list.

There is one little problem: it just does not work. Player moves as if penalty is zero.
Everything works fine for GridMesh, GUO works fine, area is marked tag-1, penalty is correctly set. It just does not work for NavMeshGraph.

Is here some way to solve this?


Sorry for the late answer.

I cannot replicate those results.
For me penalties have a definite effect on the path. Works with both tags and directly applying penalties.
Try the latest beta, there might be a fix in there that is relevant.

Hi, I took latest version and made a project to reproduce bug. I copied GUO from another scene and placed it on navmesh. Graph seems to changed penalty (red gizmos), but agent still goes through area like if penalty is zero.

Try this project to reproduce bug (open “Scene”):


Ouch. Found the bug.
I have forgot this line at the top of a script when testing


That will strip out the code which takes penalties into account.
In the free version the correct code would be completely removed and only the code which did not take penalties into account would be left.

Just uploading version 3.7.2 which fixes this bug.