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

Stop calculating the current path request.

DeregisterModifier (modifier)

Called by modifiers when they are disabled or destroyed.

Draws gizmos for the Seeker.

Path that is currently being calculated or was last calculated.

IsDone ()

Is the current path done calculating.

PostProcess (path)

Post-processes a path.

RegisterModifier (modifier)

Called by modifiers to register themselves.

RunModifiers (pass, path)

Runs modifiers on a path.

Seeker ()
StartMultiTargetPath (..., pathsForAll, callback, [graphMask])

Starts a Multi Target Path from...

StartPath (...)

Queue a path to be calculated.

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
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
traversalProvider

Custom traversal provider to calculate which nodes are traversable and their penalties.

Public

Public Enums

ModifierPass
Public

Private/Protected Members

Awake ()

Initializes a few variables.

Cleans up some variables.

Called once for a MultiTargetPath.

Called for each path in a MultiTargetPath.

Called when a path has completed.

OnUpgradeSerializedData (migrations, unityThread)

Releases the path used for gizmos (if any).

Reset ()

Handle serialization backwards compatibility.

StartPathInternal (p, callback)

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

UpgradeSerializedData (isUnityThread)
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
onPartialPathDelegate

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

Private Readonly
onPathDelegate

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

Private Readonly
path

The current path.

Protected
prevPath

Previous path.

Private
tmpPathCallback

Temporary callback only called for the current path.

Private

Deprecated Members

pathCallback

Callback for when a path is completed.

Public