I have 3 graph layers set up in my scene, all 3 work together, when I place a building I affect a change to the ground graph using the nav cut component, this also works however it is causing a really big hole to be cut out of the air navmesh even though the layer is set to not be affected by them, this is causing my air units to plot around it, this is not something I want to have happen.
Is there some way of altering the update code to only affecting the desired graph layer? I have included a copy of the update code below:
GameObject buildingObject = building.gameObject.GetComponentInChildren<AdvancedBuildingPlacer>().gameObject; Bounds cutterBounds = buildingObject.GetComponent<BoxCollider>().bounds; var guo = new GraphUpdateObject(cutterBounds); guo.updatePhysics = false; guo.modifyWalkability = false; AstarPath.active.UpdateGraphs(guo);
I also have a screenshot of a really big hole being cut out of the air graph layer, this is at least 2-3 times bigger than the collider of the above code.
I need the air graph layer to be not affected by the placed buildings collider bounds.