Class NodeLink2 Extends GraphModifier

Public

Connects two nodes via two intermediate point nodes.

In contrast to the NodeLink component, this link type will not connect the nodes directly instead it will create two point 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 point node at this object's position (call it B) and one point 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 point 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.

See

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

Public Methods

Apply (forceNewCheck)

Connects the start and end points using a link or refreshes the existing link.

Public
DrawGizmos ()
Public
OnGraphsPostUpdateBeforeAreaRecalculation ()

Called after graphs have been updated.

Public

Public Static Methods

GetNodeLink (node)

Public Variables

EndNode
Public
EndTransform
Public
StartNode
Public
StartTransform
Public
costFactor

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

Public
end

End position of the link.

Public
endNode
Public
oneWay

Make a one-way connection.

Public
pathfindingTag

The tag to apply to the link.

Public
startNode
Public

Inherited Public Members

EventType

GraphModifier event type.

Public
FindAllModifiers ()
Public Static
OnGraphsPostUpdate ()

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

Public
OnGraphsPreUpdate ()

Called before graphs are updated using GraphUpdateObjects.

Public
OnLatePostScan ()

Called at the end of the scanning procedure.

Public
OnPostCacheLoad ()

Called after cached graphs have been loaded.

Public
OnPostGraphLoad ()

Called after a graph has been deserialized and loaded.

Public
OnPostScan ()

Called right after all graphs have been scanned.

Public
OnPreScan ()

Called right before graphs are going to be scanned.

Public
TriggerEvent (type)

Triggers an event for all active graph modifiers.

Public Static

Private/Protected Members

Awake ()
Protected
ContextApplyForce ()
Private
CreateLinkNodes ()
Private
DeserializeReferences (ctx)
Internal Static
GetConnectedNode (linkNode)
Internal
GetModifiersOfType<T> ()
Protected Static
GizmosColor
Private Static Readonly
GizmosColorSelected
Private Static Readonly
OnDestroy ()
Protected
OnDisable ()

Removes this modifier from list of active modifiers.

Protected
OnEnable ()

Adds this modifier to list of active modifiers.

Protected
OnUpgradeSerializedData (version, unityThread)

Handle serialization backwards compatibility.

Protected
RemoveConnections (node)
Private Static
Reset ()

Handle serialization backwards compatibility.

Protected
SerializeReferences (ctx)
Internal Static
UpgradeSerializedData (isUnityThread)
Protected
clamped1
Private
clamped2
Private
connectedNode1
Private
connectedNode2
Private
linkCreated
Private
reference
Protected Static
uniqueID

Unique persistent ID for this component, used for serialization.

Protected
usedIDs

Maps persistent IDs to the component that uses it.

Protected Static