Update on runtime a specific graph

In my Pathfinder I have multiple grid graphs. Different sizes, and functionality.
But when I try to update a graph during runtime with things like dynamic grid obstacle, graph update scene, etc, or manually, I only find functionality to update ALL the graphs.

Is there anything that I’m missing to update just ONE graph of all the ones in the pathfinder?

Hi

You can specify this using the graphMask field:

var update = new GraphUpdateObject(bounding box);
update.nnConstraint.graphMask = GraphMask.FromGraphName("My Graph");
AstarPath.active.UpdateGraphs(update);

Oh, I didnt see that I could use constrains for that too.

It’s a bit weird because when using other functionalities NNConstrains exist as a parameter, but with this specific feature you need to edit it directly from inside.

Anyways, thank you very much <3

1 Like