Support Forum

Navmesh Cut not updating

Hello,Im using latest beta, Im adding prefabs at runtime that have navmesh cut component problem is sometimes graph gets update sometimes it doesn’t. I need to enable and disable the navmesh cut component manually to make it work again. To temp fix these I’m using following code but sometimes it still does not getting an update

Component[] navCuts;
navCuts =g.GetComponentsInChildren(typeof(NavmeshCut));
if (navCuts != null)
foreach (NavmeshCut cut in navCuts)
cut.enabled = false;
cut.enabled = true;

Hmm, that’s odd. What’s the updateDistance field on the NavmeshCut component set to?

Can you show a screenshot when you have the navmesh cut selected and the cut is not getting applied?

Hello, updatedistance field is 0.4f
Basically objects are added in runtime sometimes(rarely) don’t update graph it is hard to get screenshot but I found workaround basically I called Invoke and update cut after object is generated. Another problem was in Im loading scene to go to different levels now A* component works well in editor generate graph at startup but when I added it in runtime graph was generated but it missed all colliders, Catching graph in rumtime fixed it though