Class OffMeshLinks

Public

Manager for off-mesh links.

This manager tracks all active off-mesh links in the scene and recalculates them when needed. If an off-mesh link is activated, a LinkGraph will also be added to the graph list to store the special nodes necessary for the links to work.

Whenever a graph update happens, the DirtyBounds method should be called with the bounds of the updated area. This will cause the links touching that bounding box to be recalculated at the end of the graph update step.

Typically you will not need to interact with this class yourself, instead you can use the pre-built components like NodeLink2.

Inner Types

The start or end point of an off-mesh link.

Public Methods

Add (link)

Adds a new off-mesh link.

Public
ConnectedGraphs (link)

Get all graphs that this link is connected to.

Public
Dirty (link)

Mark a link as dirty.

Public
DirtyBounds (bounds)

Mark links touching the given bounds as dirty.

Public
GetNearest (point, maxDistance)

Get the nearest link to a point.

Public
OffMeshLinks (astar)
Remove (link)

Removes an existing off-mesh link.

Public

Public Enums

Directionality

Determines how a link is connected in the graph.

Public
OffMeshLinkStatus
Public

Private/Protected Members

ClampSegment (anchor, graphMask, maxSnappingDistance, result, nodes)
Private
DirtyNoSchedule (link)
Internal
OnDisable ()
Internal
Refresh ()
Internal
ScheduleUpdate ()
Private
astar
Private
cachedNNConstraint
Private
pendingAdd
Private
tree
Private
updateScheduled
Private