How do I rescan a graph in runtime?

My graph isn’t all that complicated; I just have the one grid graph in my scene.
But I do have blocks that can be destroyed, and when this happens, I need to update the graph.

First of all, how do I do this? I am not even sure what script I would need to access, let alone what function to call.

Second of all, are there any optimizations I should be aware of? I am literally changing only one square on a grid graph; is there any way I can just have the system rescan that one spot rather than the whole graph?


This documentation page should help you out: Graph Updates during Runtime - A* Pathfinding Project

1 Like

Just what I needed!
I decided to just slap the dynamic grid obstacle script on my blocks, (I set the check time to 60 seconds since they don’t move,) and they automatically update the grid when they get removed from the scene!