unity-navmesh
Unity 6.3 LTS pathfinding with the AI Navigation package: NavMeshSurface baking, NavMeshAgent, NavMeshLink jumps and runtime rebakes
Install / Use
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-navmeshInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OtherSupported Platforms
Tags
Our assessment of unity-navmesh
unity-navmesh scores 95/100 on our quality scale, 24th of 329 Other skills we index (top 8%).
Its SKILL.md is 6.8 KB long, well organised into 12 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
With 8,904 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 4 days ago, so unity-navmesh is actively maintained.
- Our last check on 2026-11-15 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-08. Automated pattern scan on 2026-10-08. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
unity-navmesh compared with similar skills
All 4 of these similar skills score higher than unity-navmesh; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| unity-navmesh (this skill)by gamedev-skills | 95 | 8.9k | 4d ago | SKILL.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 149.0k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install unity-navmesh?
- Run
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-navmesh. The install tabs above show the steps for each supported agent. - Which AI agents does unity-navmesh work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is unity-navmesh safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is unity-navmesh still maintained?
- The repository was last updated 4 days ago, so unity-navmesh is actively maintained.
Skill content
View source on GitHubname: 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 runtimeNavMeshAgent/NavMeshAPI stays in built-inUnityEngine.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
NavMeshSurfacecomponent, or scripts usingUnityEngine.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
- Install the AI Navigation package (Package Manager →
com.unity.ai.navigation). - 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. - Add a
NavMeshAgentto each moving NPC; its radius/height/speed must match the baked agent type, and it must spawn on the baked mesh. - Drive it from script with
SetDestination(targetPos); the agent steers and avoids other agents automatically. Detect arrival withremainingDistance/pathPending. - Handle dynamic blockers with
NavMeshObstacle(carving) so closed doors/crates block paths without a full re-bake. - 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.statusfor unreachable targets.
Patterns
1. Chase/seek with a NavMeshAgent
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
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)
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
// 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.
5. Connect separate mesh pieces with a NavMeshLink (jumps, doors, gaps)
// 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).
Pitfalls
- Looking for the Navigation window — it no longer exists in Unity 6. Use the AI Navigation
package's
NavMeshSurfacecomponent + 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.SamplePositionto snap). - Agent ignores new geometry — the navmesh is baked; runtime-spawned obstacles need a
NavMeshObstacle(carving) or asurface.BuildNavMesh()re-bake. SetDestinationevery 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
avoidancePriorityand quality, or use an obstacle for truly static blockers rather than relying on agent avoidance. - Reaching for
OffMeshLink— the built-inOffMeshLinkcomponent is deprecated in AI Navigation 2.0 and can no longer be added from the Add Component menu. Use aNavMeshLink(from the package,Unity.AI.Navigation) instead — it adds Transform-based endpoints and a runtimeactivatedproperty. Migrate any existingOffMeshLinks. CalculatePathreturnsPathPartial— the destination sits on a different baked island than the agent (a gap the mesh doesn't cross). Bridge the two with aNavMeshLink(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), theNavMeshLinkpage (https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/manual/NavMeshLink.html) and its "What's new" note on theOffMeshLinkdeprecation (https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/manual/whats-new.html), plusScriptReference/AI.NavMeshAgent,ScriptReference/AI.NavMesh.
Related skills
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.
Related Skills
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
149.0kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
