Function NavGraph.DirtyBounds
Notifies the system that changes have been made inside these bounds.
void DirtyBounds (
bounds |
Notifies the system that changes have been made inside these bounds.
This should be called by graphs whenever they are changed. It will cause off-mesh links to be updated, and it will also ensure GraphModifier events are callled.
The bounding box should cover the surface of all nodes that have been updated. It is fine to use a larger bounding box than necessary (even an infinite one), though this may be slower, since more off-mesh links need to be recalculated. You can even use an infinitely large bounding box if you don't want to bother calculating a more accurate one. You can also call this multiple times to dirty multiple bounding boxes.
When scanning the graph, this is called automatically - with the value from the bounds property - for all graphs after the scanning has finished.
If possible, it is recommended to use IGraphUpdateContext.DirtyBounds or IWorkItemContext.DirtyBounds instead of this method. They currently do the same thing, but that may change in future versions.