|
struct | GUOSingle |
| Holds a single update that needs to be performed on a graph. More...
|
|
◆ GraphUpdateOrder
Order type for updating graphs.
◆ GraphUpdateProcessor()
◆ AddToQueue()
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 AstarPath.batchGraphUpdates)
- See also
- FlushGraphUpdates
◆ DisableMultithreading()
void DisableMultithreading |
( |
| ) |
|
◆ EnableMultithreading()
void EnableMultithreading |
( |
| ) |
|
◆ GetWorkItem()
Work item which can be used to apply all queued updates.
◆ ProcessGraphUpdates()
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.
◆ ProcessGraphUpdatesAsync()
void ProcessGraphUpdatesAsync |
( |
| ) |
|
|
private |
Graph update thread.
Async graph updates will be executed by this method in another thread.
◆ ProcessPostUpdates()
void ProcessPostUpdates |
( |
| ) |
|
|
private |
◆ ProcessRegularUpdates()
bool ProcessRegularUpdates |
( |
bool |
force | ) |
|
|
private |
◆ QueueGraphUpdatesInternal()
void QueueGraphUpdatesInternal |
( |
| ) |
|
|
private |
Schedules graph updates internally.
◆ StartAsyncUpdatesIfQueued()
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.
◆ anyGraphUpdateInProgress
bool anyGraphUpdateInProgress |
|
private |
Used for IsAnyGraphUpdateInProgress.
◆ astar
Holds graphs that can be updated.
◆ asyncGraphUpdatesComplete
readonly System.Threading.ManualResetEvent asyncGraphUpdatesComplete = new System.Threading.ManualResetEvent(true) |
|
private |
◆ exitAsyncThread
readonly System.Threading.AutoResetEvent exitAsyncThread = new System.Threading.AutoResetEvent(false) |
|
private |
◆ graphUpdateAsyncEvent
readonly System.Threading.AutoResetEvent graphUpdateAsyncEvent = new System.Threading.AutoResetEvent(false) |
|
private |
◆ graphUpdateQueue
Queue containing all waiting graph update queries.
Add to this queue by using AddToQueue.
- See also
- AddToQueue
◆ graphUpdateQueueAsync
Queue of all async graph updates waiting to be executed.
◆ graphUpdateQueuePost
Queue of all non-async graph update post events waiting to be executed.
◆ graphUpdateQueueRegular
Queue of all non-async graph updates waiting to be executed.
◆ graphUpdateThread
◆ IsAnyGraphUpdateInProgress
bool IsAnyGraphUpdateInProgress |
|
get |
Returns if any graph updates are in progress.
◆ IsAnyGraphUpdateQueued
bool IsAnyGraphUpdateQueued |
|
get |
Returns if any graph updates are waiting to be applied.
◆ OnGraphsUpdated
System.Action OnGraphsUpdated |
The documentation for this class was generated from the following file: