navmesh

Configure Unity NavMeshSurface and NavMeshAgent for deterministic AI navigation.

Updated May 6, 2026
One-click install
npx skills add https://github.com/BasarEkinci/memory-card-game --skill navmesh-basarekinci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: navmesh
Source: https://github.com/BasarEkinci/memory-card-game/tree/main/.claude/skills/systems/navmesh
Command: npx skills add https://github.com/BasarEkinci/memory-card-game --skill navmesh-basarekinci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity navigation often fails or behaves unpredictably when agents are sent to unreachable points, when NavMesh baking settings don’t match agent parameters, or when dynamic obstacles and multi-agent crowds require careful handling.

Core Features & Use Cases

  • NavMesh setup and agent configuration: Use NavMeshSurface baking plus NavMeshAgent tuning (speed, acceleration, stopping distance) to get consistent movement.
  • Robust path handling: Inspect pathStatus (complete/partial/invalid), detect arrival, and avoid silent SetDestination failures by snapping targets onto the NavMesh first.
  • Dynamic navigation behaviors: Use NavMeshObstacle carving vs blocking, off-mesh links for jumps/ladders/teleports, and runtime rebakes/updates when the environment changes.
  • AI patterns for decision-making and scaling: Apply NavMesh.Raycast line-of-sight, NavMesh.SamplePosition for safe targets, and manual CalculatePath evaluation to plan without committing; coordinate repathing, formations, and avoidance priorities for many agents.

Quick Start

Configure your NavMesh with NavMeshSurface, set your NavMeshAgent parameters to match the bake settings, and route agents by sampling the destination to the nearest NavMesh point before calling SetDestination.

Frequently Asked Questions about navmesh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Unity NavMeshAgent fail to reach destinations or move unpredictably?

Unity NavMeshAgent movement fails when targets are unreachable or bake settings mismatch agent parameters. You must snap destinations to the nearest NavMesh point using NavMesh.SamplePosition before calling SetDestination to ensure valid paths.

How do I handle dynamic obstacles and runtime NavMesh updates in Unity?

Handle dynamic NavMesh obstacles by configuring NavMeshObstacle carving versus blocking based on movement needs. Use runtime NavMeshSurface rebakes or updates when environments change to maintain valid agent paths without stopping gameplay.

How do I validate a Unity NavMesh path before sending an agent to a destination?

Validate Unity NavMesh paths by evaluating pathStatus for complete, partial, or invalid states. Use NavMesh.CalculatePath to plan routes and NavMesh.Raycast to check line-of-sight without committing agent movement.

What is the best way to manage NavMesh repathing and pooling for many AI agents?

Manage NavMesh repathing for many AI agents by implementing pathStatus-aware logic and performance-safe pooling practices. Coordinate repathing intervals, formation slots, and avoidance priorities to achieve deterministic, scalable navigation behavior.

How do I use off-mesh links for jumps and teleports in Unity NavMesh?

Use Unity NavMesh off-mesh links to enable agent traversal for jumps, ladders, and teleports. Configure the off-mesh link connections on your NavMeshSurface to allow agents to transition between disconnected NavMesh areas seamlessly.

Can I use NavMeshSurface baking for multi-agent crowds and formations in Unity?

NavMeshSurface baking supports multi-agent crowds and formation slot navigation in Unity. Tune NavMeshAgent speed, acceleration, and stopping distance to match the bake settings for consistent and collision-free movement.