Quick answer: Check agent.areaMask includes the link’s Area Type bit. Confirm both endpoints are within the AutoConnect distance of the navmesh. Increase Cost only if you want agents to prefer ground.
A platformer enemy can’t jump across a gap with a NavMeshLink. Path stops at the edge. The link is configured correctly but the agent walks back the long way.
Visualize the Link
NavMeshLink shows in scene view as a colored line between two endpoints. Both endpoint markers should sit on solid navmesh (visible blue surface).
Disconnect symptom: gray endpoint = link can’t connect. Move it to be within AutoConnect Distance of valid navmesh.
Area Mask Alignment
Navigation Areas window: define areas (Walkable, Jump, Climb). Set the link’s Area Type. Then on agents:
agent.areaMask = NavMesh.GetAreaFromName("Walkable") | NavMesh.GetAreaFromName("Jump");
Or in Inspector: check both Walkable and Jump in agent’s Area Mask dropdown. Without Jump, the agent ignores Jump-area links.
Cost Tuning
If cost is too high, agent prefers a long walk to a short jump. Default jump cost is fine for most setups; check Navigation → Areas if you raised it.
Code-Driven Traversal
agent.autoTraverseOffMeshLink = false;
void Update() {
if (agent.isOnOffMeshLink) {
StartCoroutine(JumpAnimation(agent));
}
}
IEnumerator JumpAnimation(NavMeshAgent a) {
OffMeshLinkData data = a.currentOffMeshLinkData;
float t = 0;
while (t < 1) {
t += Time.deltaTime;
a.transform.position = Vector3.Lerp(data.startPos, data.endPos, t) + Vector3.up * Mathf.Sin(t * Mathf.PI);
yield return null;
}
a.CompleteOffMeshLink();
}
Custom jump arc. Call CompleteOffMeshLink when done; resumes normal pathing.
Rebake
After any navmesh-affecting change, rebake (Navigation → Bake). Links don’t require rebake but endpoint validity does.
Verifying
Set destination across a gap. Agent walks, then jumps. Path visualization (NavMesh.CalculatePath) shows route uses the link.
“Links are opt-in by area mask. Make sure your agent is invited to use them.”
Use named areas religiously — ‘Jump’, ‘Climb’, ‘Swim’ — not generic Walkable. Naming reveals the intent of each link to anyone reading the scene.