Add AI navigation in Unity 6.3 LTS: bake a NavMesh with the AI Navigation package (NavMeshSurface), move agents with NavMeshAgent.SetDestination, and handle dynamic obstacles.

Apache-2.0Auto-check passedGame Development

Install Unity Navmesh

skills CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-navmesh -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gamedev-skills/awesome-gamedev-agent-skills unity-navmesh --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/unity/unity-navmesh .claude/skills/unity-navmesh && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unity-navmesh
GitHub stars
1.4k
Token cost
~1.8k tokens
SKILL.md length
593 words
Files
1
Skills in repo
53
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add AI navigation in Unity 6.3 LTS: bake a NavMesh with the AI Navigation package (NavMeshSurface), move agents with NavMeshAgent.SetDestination, and handle dynamic obstacles.

  • Works in 5 steps: Chase/seek with a NavMeshAgent → Check reachability before committing → Bake at runtime (for procedurally built… → …
  • Setting up pathfinding
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Reaches docs.unity3d.com

What it does

Unity Navmesh is an agent skill from gamedev-skills/awesome-gamedev-agent-skills. Add AI navigation in Unity 6.3 LTS: bake a NavMesh with the AI Navigation package (NavMeshSurface), move agents with NavMeshAgent.SetDestination, and handle dynamic obstacles. Use when setting up pathfinding, making an enemy chase the player, baking navigation, or when the user mentions NavMesh, NavMeshAgent, NavMeshSurface, NavMeshObstacle, or Unity pathfinding.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering Game development. The repository describes itself as: 74 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic… The licence is Apache-2.0.

When your agent uses it

  • Setting up pathfinding
  • Making an enemy chase the player
  • Baking navigation
  • The user mentions NavMesh

Example prompts

  • “/unity-navmesh”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Chase/seek with a NavMeshAgent
  2. Check reachability before committing
  3. Bake at runtime (for procedurally built or streamed levels)
  4. Dynamic obstacle that carves the mesh
  5. Connect separate mesh pieces with a NavMeshLink (jumps, doors, gaps)

What it can do on your machine

Read from SKILL.md and the folder at commit 0a70cfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • docs.unity3d.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unity Navmesh loads about 1.8k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 593 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gamedev-skills/awesome-gamedev-agent-skills at commit 0a70cfc, republished under its Apache-2.0 licence (© gamedev-skills). 593 words, ~1,750 tokens.

Download SKILL.mdSave it as .claude/skills/unity-navmesh/SKILL.md (or your agent's skills folder).
name
unity-navmesh
description
Add AI navigation in Unity 6.3 LTS: bake a NavMesh with the AI Navigation package (NavMeshSurface), move agents with NavMeshAgent.SetDestination, and handle dynamic obstacles. Use when setting up pathfinding, making an enemy chase the player, baking navigation, or when the user mentions NavMesh, NavMeshAgent, NavMeshSurface, NavMeshObstacle, or Unity pathfinding.

Unity NavMesh (AI Navigation)

Give NPCs pathfinding in Unity 6.3 LTS: bake walkable surfaces and move agents around obstacles. Targets Unity 6.3 LTS (6000.3) with the AI Navigation package 2.x.

Version trap (Unity 2022+/6): the old built-in Navigation window (Object/Bake tabs) is gone. Baking is now component-based via the AI Navigation package (com.unity.ai.navigation): add a NavMeshSurface to your level geometry and click Bake. The runtime NavMeshAgent/NavMesh API stays in built-in UnityEngine.AI.

When to use

  • Use when an agent needs to walk/chase/patrol to a target, when baking a navigable surface, adding dynamic blockers (NavMeshObstacle), or checking whether a destination is reachable.
  • Use when the project has the AI Navigation package, a NavMeshSurface component, or scripts using UnityEngine.AI.NavMeshAgent.

When not to use: the decision logic of when/where to move (FSMs, behaviour trees, steering) → game-ai (this skill is the Unity movement/pathing mechanism). Force-driven or kinematic movement that isn't pathfinding → unity-physics.

Core workflow

  1. Install the AI Navigation package (Package Manager → com.unity.ai.navigation).
  2. Bake a surface: select the static level geometry, Add Component → Navigation → NavMesh Surface, set the agent type/area settings, and click Bake. Re-bake whenever geometry, NavMeshModifiers, or agent settings change.
  3. Add a NavMeshAgent to each moving NPC; its radius/height/speed must match the baked agent type, and it must spawn on the baked mesh.
  4. Drive it from script with SetDestination(targetPos); the agent steers and avoids other agents automatically. Detect arrival with remainingDistance/pathPending.
  5. Handle dynamic blockers with NavMeshObstacle (carving) so closed doors/crates block paths without a full re-bake.
  6. Verify with the AI Navigation overlay (the baked mesh is drawn in the Scene view) and by watching agents path around obstacles to the goal; check NavMeshPath.status for unreachable targets.

Patterns

1. Chase/seek with a NavMeshAgent
csharp
using UnityEngine;
using UnityEngine.AI;

[RequireComponent(typeof(NavMeshAgent))]
public class Chaser : MonoBehaviour
{
    [SerializeField] private Transform target;
    private NavMeshAgent _agent;

    private void Awake() => _agent = GetComponent<NavMeshAgent>();

    private void Update()
    {
        if (target) _agent.SetDestination(target.position);   // re-path toward the target
    }

    // Arrived? pathPending guards the first frame before a path exists.
    private bool HasArrived() =>
        !_agent.pathPending && _agent.remainingDistance <= _agent.stoppingDistance;
}
2. Check reachability before committing
csharp
using UnityEngine.AI;

public bool CanReach(NavMeshAgent agent, Vector3 destination)
{
    var path = new NavMeshPath();
    agent.CalculatePath(destination, path);
    return path.status == NavMeshPathStatus.PathComplete;   // vs Partial / Invalid
}
3. Bake at runtime (for procedurally built or streamed levels)
csharp
using Unity.AI.Navigation;   // the package namespace (NavMeshSurface)

[SerializeField] private NavMeshSurface surface;

// After spawning level geometry, build the navmesh in code.
public void RebuildNav() => surface.BuildNavMesh();
4. Dynamic obstacle that carves the mesh
csharp
// Add a NavMeshObstacle (Carve = true) to a door/crate. While present it cuts a hole in the
// navmesh so agents route around it; remove/disable it to reopen the path — no re-bake needed.
csharp
// Two baked surfaces that don't touch (a ledge and the floor below, two platforms across a
// gap) are separate islands — an agent can't path between them. Add Component > Navigation >
// NavMesh Link to bridge them: assign Start/End Transforms, set Width (0 = point-to-point),
// and toggle Bidirectional for one-way vs two-way. NavMeshLink lives in Unity.AI.Navigation.
// It replaces the deprecated built-in OffMeshLink (see pitfalls).
Show full SKILL.md (276 more words)Show less

Pitfalls

  • Looking for the Navigation window — it no longer exists in Unity 6. Use the AI Navigation package's NavMeshSurface component + Bake.
  • Agent doesn't move / warps to origin — it isn't on the baked mesh, or no surface was baked. Bake the surface and spawn the agent on it (NavMesh.SamplePosition to snap).
  • Agent ignores new geometry — the navmesh is baked; runtime-spawned obstacles need a NavMeshObstacle (carving) or a surface.BuildNavMesh() re-bake.
  • SetDestination every frame is wasteful — for a slow-moving target, re-path on a timer (e.g. every 0.2s) instead of each frame.
  • Agent radius/height mismatch — if the NavMeshAgent's size differs from the baked agent type, it gets stuck in gaps or floats; keep them consistent.
  • Agents jitter against each other — tune avoidancePriority and quality, or use an obstacle for truly static blockers rather than relying on agent avoidance.
  • Reaching for OffMeshLink — the built-in OffMeshLink component is deprecated in AI Navigation 2.0 and can no longer be added from the Add Component menu. Use a NavMeshLink (from the package, Unity.AI.Navigation) instead — it adds Transform-based endpoints and a runtime activated property. Migrate any existing OffMeshLinks.
  • CalculatePath returns PathPartial — the destination sits on a different baked island than the agent (a gap the mesh doesn't cross). Bridge the two with a NavMeshLink (pattern 5) or extend the geometry so one surface covers both; a partial path only reaches the near edge.

References

  • Primary docs: AI Navigation package manual (https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/manual/index.html), the NavMeshLink page (https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/manual/NavMeshLink.html) and its "What's new" note on the OffMeshLink deprecation (https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/manual/whats-new.html), plus ScriptReference/AI.NavMeshAgent, ScriptReference/AI.NavMesh.
  • game-ai — engine-agnostic decision-making (FSM, behaviour trees, steering) that uses this.
  • unity-csharp-scripting — the MonoBehaviour structure around the agent.
  • tower-defense / fps-shooter — genres that compose pathfinding with gameplay.

© gamedev-skills, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/unity/unity-navmesh of gamedev-skills/awesome-gamedev-agent-skills.

Open the folder on GitHubat commit 0a70cfc

Compare with similar skills

Unity Navmesh next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unity Navmesh compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unity Navmesh this skillgamedev-skills/awesome-gamedev-agent-skills1.4k—~1.8kAutomated safety check: PassApache-2.0
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
Sprite Genaldegad/sprite-gen2.7k—~4.9kAutomated safety check: PassApache-2.0
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Fantasy Framework Development Guideqq362946/Fantasy1.4k—~5.8kAutomated safety check: PassCustom licence
Dev StoryDonchitos/Claude-Code-Game-Studios26k—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • Sprite Gen

    aldegad/sprite-gen

    Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation.

    2.7k GitHub stars~4.9k tokensUpdated today
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Development and review guide for the Fantasy C# distributed game server framework: ECS, FTask, routing, service discovery, config and databases.

    1.4k GitHub stars~5.8k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Dev Story

    Donchitos/Claude-Code-Game-Studios

    Implement a story: ADR guidelines, right programmer agent, code plus test.

    26k GitHub stars~2.4k tokensUpdated 2 days ago
    Game DevelopmentAuto-check: notes
  • Plays an authorized Game Boy or Game Boy Color ROM in one persistent headless Coffee GB session, inspecting frames and keeping an action trace for replay or tests.

    1.2k GitHub stars~1.3k tokensUpdated 8 days ago
    Game DevelopmentAuto-check passed

More from gamedev-skills/awesome-gamedev-agent-skills

All 53 skills in this repo
  • Create Game Assets

    gamedev-skills/awesome-gamedev-agent-skills

    Plan, generate, source, normalize, and validate cohesive visual game assets.

    1.4k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Roblox UI

    gamedev-skills/awesome-gamedev-agent-skills

    Build production Roblox interfaces with ScreenGui/PlayerGui lifecycle, responsive UDim2 layouts, safe insets, reusable editable Instances, cross-device input and selection, restrained motion…

    1.4k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • AI Behavior Trees Utility AI

    gamedev-skills/awesome-gamedev-agent-skills

    Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential…

    1.4k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Bevy Ecs

    gamedev-skills/awesome-gamedev-agent-skills

    Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the…

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Card Game

    gamedev-skills/awesome-gamedev-agent-skills

    Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.

    1.4k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Fps Shooter

    gamedev-skills/awesome-gamedev-agent-skills

    Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI.

    1.4k GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Questions about Unity Navmesh

What does Unity Navmesh do?

Add AI navigation in Unity 6.3 LTS: bake a NavMesh with the AI Navigation package (NavMeshSurface), move agents with NavMeshAgent.SetDestination, and handle dynamic obstacles. Unity Navmesh is an agent skill from gamedev-skills/awesome-gamedev-agent-skills.SetDestination, and handle dynamic obstacles.

When should I use Unity Navmesh?

Unity Navmesh fits situations like: setting up pathfinding; making an enemy chase the player; baking navigation; the user mentions NavMesh.

How do I install Unity Navmesh in Claude Code?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-navmesh -a claude-code`. Or copy the skill folder (skills/unity/unity-navmesh in gamedev-skills/awesome-gamedev-agent-skills) into .claude/skills/unity-navmesh in your project. Claude Code loads it when a task matches its description.

How do I install Unity Navmesh in Codex?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-navmesh -a codex`. Or copy the skill folder (skills/unity/unity-navmesh in gamedev-skills/awesome-gamedev-agent-skills) into .agents/skills/unity-navmesh in your project. Codex loads it when a task matches its description.

Can I use Unity Navmesh in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-navmesh -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unity-navmesh, .gemini/skills/unity-navmesh, .github/skills/unity-navmesh and .opencode/skills/unity-navmesh in your project.

What does Unity Navmesh need to run?

SKILL.md names no scripts, command-line tools or credentials: Unity Navmesh is instructions for the agent only.

Does Unity Navmesh access the network?

SKILL.md names 1 domain. In commands or code: docs.unity3d.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Unity Navmesh safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unity Navmesh use?

Unity Navmesh is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unity Navmesh use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Unity Navmesh?

Skills that share tags, products or a category with Unity Navmesh: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), Sprite Gen (aldegad/sprite-gen, 2.7k stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars) and Fantasy Framework Development Guide (qq362946/Fantasy, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unity Navmesh?

gamedev-skills (a GitHub organization) maintains it in gamedev-skills/awesome-gamedev-agent-skills, which has 1,389 GitHub stars. The repository holds 53 skills in this directory. The repository was last updated on October 9, 2026.

Source: gamedev-skills/awesome-gamedev-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.