Class NodeLink2 Extends GraphModifier

Public

Connects two nodes using an off-mesh link.

In contrast to the NodeLink component, this link type will not connect the nodes directly instead it will create two link nodes at the start and end position of this link and connect through those nodes.

If the closest node to this object is called A and the closest node to the end transform is called D, then it will create one link node at this object's position (call it B) and one link node at the position of the end transform (call it C), it will then connect A to B, B to C and C to D.

This link type is possible to detect while following since it has these special link nodes in the middle. The link corresponding to one of those intermediate nodes can be retrieved using the GetNodeLink method which can be of great use if you want to, for example, play a link specific animation when reaching the link.

End

End position of the link.

Cost Factor

The connection will be this times harder/slower to traverse.

One Way

Make a one-way connection.

Pathfinding Tag

The tag to apply to the link.

Graph Mask

Which graphs this link is allowed to connect.

See

Off-mesh links

The example scene RecastExample2 contains a few links which you can take a look at to see how they are used.

Note

If you make any modifications to the node link's settings after it has been created, you need to call the Apply method in order to apply the changes to the graph.

Public Methods

Apply ()

Disconnects and then reconnects the link to the graph.

Called right after all graphs have been scanned.

Public Static Methods

Public Variables

EndTransform
Public
StartTransform
Public
costFactor

The connection will be this times harder/slower to traverse.

Public
end

End position of the link.

Public
graphMask

Which graphs this link is allowed to connect.

Public
onTraverseOffMeshLink

Callback to be called when an agent starts traversing an off-mesh link.

oneWay

Make a one-way connection.

Public
pathfindingTag

The tag to apply to the link.

Public

Inherited Public Members

EventType

GraphModifier event type.

Public

Called after graphs have been updated using GraphUpdateObjects or navmesh cutting.

Called after graphs have been updated.

Called before graphs are updated using GraphUpdateObjects.

Called at the end of the scanning procedure.

Called after cached graphs have been loaded.

Called after a graph has been deserialized and loaded.

Called right before graphs are going to be scanned.

TriggerEvent (type)

Triggers an event for all active graph modifiers.

Private/Protected Members

Awake ()
GizmosColor
Private Static Readonly
GizmosColorSelected
Private Static Readonly

Removes this modifier from list of active modifiers.

Adds this modifier to list of active modifiers.

OnUpdate (components, count)
OnUpgradeSerializedData (migrations, unityThread)

Handle serialization backwards compatibility.

Reset ()

Handle serialization backwards compatibility.

UpgradeSerializedData (isUnityThread)
isActive

True if the link is connected to the graph.

Internal
linkSource
Protected
onTraverseOffMeshLinkHandler
Private
uniqueID

Unique persistent ID for this component, used for serialization.

Protected
usedIDs

Maps persistent IDs to the component that uses it.

Protected Static