Class PathProcessor

Public

Inner Types

Prevents pathfinding from running while held.

Public Methods

Dispose ()

Cleans up all native memory managed by this instance.

Public
PausePathfinding (block)

Prevents pathfinding threads from starting to calculate any new paths.

Public
SetThreadCount (processors, multithreaded)

Changes the number of threads used for pathfinding.

Public
StopThreads ()

Calls 'Join' on each of the threads to block until they have completed.

Public
TickNonMultithreaded ()

Does pathfinding calculations when not using multithreading.

Public

Public Variables

IsUsingMultithreading

Returns whether or not multithreading is used.

Public
NumThreads

Number of parallel pathfinders.

Public

Public Events

OnPathPostSearch
Public
OnPathPreSearch
Public
OnQueueUnblocked
Public

Private/Protected Members

CalculatePaths (pathHandler)

Main pathfinding method.

Private
CalculatePathsThreaded (pathHandler, receiver)

Main pathfinding method (multithreaded).

Private
Lock (block)
Private
MarkerCalculatePath
Private Static Readonly
MarkerPreparePath
Private Static Readonly
PathProcessor (astar, returnQueue, processors, multithreaded)
Internal
StartThreads ()
Private
Unlock (id)
Private
astar
Private Readonly
coroutineReceiver
Private
locks
Private Readonly
multithreaded
Private
nextLockID
Private
pathHandlers
Private
queue
Internal
returnQueue
Private Readonly
threadCoroutine

When no multithreading is used, the IEnumerator is stored here.

Private
threads

References to each of the pathfinding threads.

Private