Class Seeker Extends VersionedMonoBehaviour

Public

Handles path calls for a single unit.

This is a component which is meant to be attached to a single unit (AI, Robot, Player, whatever) to handle its pathfinding calls. It also handles post-processing of paths using modifiers.

Public Methods

CancelCurrentPathRequest (pool=true)

Stop calculating the current path request.

Public
DeregisterModifier (modifier)

Called by modifiers when they are disabled or destroyed.

Public
GetCurrentPath ()

Path that is currently being calculated or was last calculated.

Public
IsDone ()

Is the current path done calculating.

Public
OnDestroy ()

Cleans up some variables.

Public
OnDrawGizmos ()

Draws gizmos for the Seeker.

Public
PostProcess (path)

Post Processes the path.

Public
RegisterModifier (modifier)

Called by modifiers to register themselves.

Public
ReleaseClaimedPath ()

Releases the path used for gizmos (if any).

Public
RunModifiers (pass, path)

Runs modifiers on a path.

Public
Seeker ()
Public
StartMultiTargetPath (start, endPoints, pathsForAll, callback=null, graphMask=-1)

Starts a Multi Target Path from one start point to multiple end points.

Public
StartMultiTargetPath (startPoints, end, pathsForAll, callback=null, graphMask=-1)

Starts a Multi Target Path from multiple start points to a single target point.

Public
StartPath (start, end)

Call this function to start calculating a path.

Public
StartPath (p, callback=null)

Call this function to start calculating a path.

Public
StartPath (start, end, callback)

Call this function to start calculating a path.

Public
StartPath (p, callback, graphMask)

Call this function to start calculating a path.

Public
StartPath (start, end, callback, graphMask)

Call this function to start calculating a path.

Public

Public Variables

detailedGizmos

Enables drawing of the non-postprocessed path using Gizmos.

Public
drawGizmos

Enables drawing of the last calculated path using Gizmos.

Public
graphMask

Graphs that this Seeker can use.

Public
pathCallback

Callback for when a path is completed.

Public
postProcessPath

Called after a path has been calculated, right before modifiers are executed.

Public
preProcessPath

Called before pathfinding is started.

Public
startEndModifier

Path modifier which tweaks the start and end points of a path.

Public
tagPenalties

Penalties for each tag.

Public
traversableTags

The tags which the Seeker can traverse.

Public

Public Enums

ModifierPass
Public

Private/Protected Members

Awake ()

Initializes a few variables.

Protected
graphMaskCompatibility

Used for serialization backwards compatibility.

Private
lastCompletedNodePath

Used for drawing gizmos.

Private
lastCompletedVectorPath

Used for drawing gizmos.

Private
lastPathID

The path ID of the last path queried.

Protected
modifiers

Internal list of all modifiers.

Private Readonly
OnMultiPathComplete (p)

Called once for a MultiTargetPath.

Private
OnPartialPathComplete (p)

Called for each path in a MultiTargetPath.

Private
onPartialPathDelegate

Cached delegate to avoid allocating one every time a path is started.

Private Readonly
OnPathComplete (path)

Called when a path has completed.

Private
OnPathComplete (p, runModifiers, sendCallbacks)

Called when a path has completed.

Private
onPathDelegate

Cached delegate to avoid allocating one every time a path is started.

Private Readonly
OnUpgradeSerializedData (version, unityThread)

Handle serialization backwards compatibility.

Protected
path

The current path.

Protected
prevPath

Previous path.

Private
Reset ()

Handle serialization backwards compatibility.

Protected
StartPathInternal (p, callback)

Internal method to start a path and mark it as the currently active path.

Private
tmpPathCallback

Temporary callback only called for the current path.

Private

Deprecated Members

GetNewPath (start, end)

Returns a new path instance.

Public
StartMultiTargetPath (p, callback=null, graphMask=-1)

Starts a Multi Target Path.

Public