Function AstarPath.FlushWorkItems

FlushWorkItems ()

Forces work items to complete in a single frame.

Public
void FlushWorkItems ()

Forces work items to complete in a single frame.

This will force all work items to run immidiately. This will force the pathfinding threads to finish calculating the path they are currently calculating (if any) and then pause. When all threads have paused, work items will be executed (which can be e.g graph updates).

Warning

Using this very often (many times per second) can reduce your fps due to a lot of threads waiting for one another. But you probably wont have to worry about that

Note

This is almost (note almost) identical to FlushGraphUpdates, but added for more descriptive name.

Will not do anything if there are no queued work items waiting to run.