GridGraph Area change event


#1

What are the rules for how node.Area’s uint changes?
Is there a “Number of Nodes in this Area” count anywhere? A “total number of areas on the grid graph” count?
Is there “An area has been destroyed” call? Or is there a good place that I might insert an event?
Is there “A new area has been created” call? Or is there a good place that I might insert an event?


#2

Hi

Whenever a graph update happens that changes walkability, the areas need to be recalculated.
This is done using a flood filling algorithm, so the first node is assigned area 1, and all nodes in the same connected component also gets area 1. Then the next node which has not yet been assigned an area gets area 2. And so on.

There is no such count that is used anywhere and no such events. Everything is handled by the GraphUpdateProcessor.FloodFill() method however, so you should be able to insert your event handling code there if you need it.