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
RunModifiers (pass, path)

Runs modifiers on a path.

Public
Seeker ()
Public
SetModifiers (path)

Makes the path use the modifiers associated with this Seeker.

Public
StartMultiTargetPath (start, endPoints, pathsForAll, callback)
Public
StartMultiTargetPath (startPoints, end, pathsForAll, callback)
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 (path, callback)
Public
StartPath (p, callback=null)

Call this function to start calculating a path.

Public
StartPath (start, end, callback=null)

Call this function to start calculating a path.

Public
StartPath (start, end, callback)
Public
StartPath (path, 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
lastPathID

The path ID of the last path queried.

Protected
modifiers

Internal list of all modifiers.

Private Readonly
onPartialPathDelegate

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

Private Readonly
OnPathComplete (p)

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
SetDefaultGraphMask (path)

Set the graph mask only if the user has not changed it from the default value.

Private
StartPathInternal (p, callback, callback2=null, callback3=null, callback4=null)

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
tmpPathCallback2

Temporary callback only called for the current path.

Private
tmpPathCallback3

Temporary callback only called for the current path.

Private
tmpPathCallback4

Temporary callback only called for the current path.

Private
TryCallAction< T > (action, value)
Private Static

Deprecated Members

GetNewPath (start, end)

Returns a new path instance.

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

Starts a Multi Target Path.

Public