|
struct | GUOSingle |
| Holds a single update that needs to be performed on a graph. More...
|
|
Order type for updating graphs.
- Enumerator:
-
void DisableMultithreading |
( |
| ) |
|
void EnableMultithreading |
( |
| ) |
|
Floodfills all graphs and updates areas for every node.
The different colored areas that you see in the scene view when looking at graphs are called just 'areas', this method calculates which nodes are in what areas.
- See Also
- Pathfinding.Node.area
Work item which can be used to apply all queued updates.
bool ProcessGraphUpdates |
( |
bool |
force | ) |
|
|
private |
Updates graphs.
Will do some graph updates, possibly signal another thread to do them. Will only process graph updates added by QueueGraphUpdatesInternal
- Parameters
-
force | If true, all graph updates will be processed before this function returns. The return value will be True. |
- Returns
- True if all graph updates have been done and pathfinding (or other tasks) may resume. False if there are still graph updates being processed or waiting in the queue.
void ProcessGraphUpdatesAsync |
( |
| ) |
|
|
private |
Graph update thread.
Async graph updates will be executed by this method in another thread.
void ProcessPostUpdates |
( |
| ) |
|
|
private |
bool ProcessRegularUpdates |
( |
bool |
force | ) |
|
|
private |
void QueueGraphUpdatesInternal |
( |
| ) |
|
|
private |
Schedules graph updates internally.
bool StartAsyncUpdatesIfQueued |
( |
| ) |
|
|
private |
Signal the graph update thread to start processing graph updates if there are any in the graphUpdateQueueAsync queue.
- Returns
- True if the other thread was signaled.
Update all graphs using the GraphUpdateObject.
This can be used to, e.g make all nodes in an area unwalkable, or set them to a higher penalty. The graphs will be updated as soon as possible (with respect to #batchGraphUpdates)
- See Also
- FlushGraphUpdates
bool anyGraphUpdateInProgress |
|
private |
Used for IsAnyGraphUpdateInProgress.
Holds graphs that can be updated.
readonly System.Threading.ManualResetEvent asyncGraphUpdatesComplete = new System.Threading.ManualResetEvent(true) |
|
private |
readonly System.Threading.AutoResetEvent exitAsyncThread = new System.Threading.AutoResetEvent(false) |
|
private |
readonly System.Threading.AutoResetEvent graphUpdateAsyncEvent = new System.Threading.AutoResetEvent(false) |
|
private |
Queue of all async graph updates waiting to be executed.
Queue of all non-async graph update post events waiting to be executed.
Queue of all non-async graph updates waiting to be executed.
uint lastUniqueAreaIndex = 0 |
|
private |
The last area index which was used.
Used for the FloodFill function to start flood filling with an unused area.
- See Also
- FloodFill(Node node)
bool IsAnyGraphUpdateInProgress |
|
get |
Returns if any graph updates are in progress.
bool IsAnyGraphUpdateQueued |
|
get |
Returns if any graph updates are waiting to be applied.
System.Action OnGraphsUpdated |
The documentation for this class was generated from the following file: