Off-mesh links (Pro only)

Note that this section is primarily about the manual off-mesh links, namely those that are set up by the user via the OffMeshLink component. For automatically generated off-mesh links, see the the Navmesh intro

It is possible that the navmesh static geometry in the scene is disconnected, thus making it impossible for agents to get from one part of the world to the other.

To remedy this, Unity has a system of Off-mesh links

The OffMeshLink component

An off-mesh link is a component that can be placed on any object, and it has the following properties

StartThe start object of the off-mesh link.
EndThe end object of the off-mesh link.
Cost OverrideIf value is positive, use it when calculating path cost on processing a path request. Otherwise, we use the default cost (cost of the layer to which this game object belongs). If the Cost Override is set to the value 3.0, moving over the off-mesh link will be three times more expensive than moving the same distance on a default NavMesh area.
Bi DirectionalIf this is on, the link can be traversed both ways, if it's off, the link can only be traversed in the direction from Start to End.
ActivatedSpecifies if this link is actually used by the pathfinder. When this property is false, the off-mesh link will be disregarded.
Navigation LayerThis can be set to Default, Not Walkable or Jump.

Special notes on OffMeshLink properties

All properties can be changed at runtime and have immediate effect.

If the start or end transforms are unassigned, or if the position of either the start or end transforms is too far away from the NavMesh to find valid positions, the off-mesh links will not be generated. In this case, an error is displayed in the Console window.

One object can have multiple links.

Page last updated: 2013-10-14