unity-navmesh
Skill1.3k starsChanged 4 months agoApache-2.0View on GitHub
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.
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about gamedev-skills/awesome-gamedev-agent-skills
- M4jor-Tom/claude-game-dev“chore(deps): bump vendor/awesome-gamedev-agent-skills from `9ca5296` to `d4b0e35`”GitHub · Oct 5, 2026
- sudosubin/agents.nix“agent-skills.github.gamedev-skills.awesome-gamedev-agent-skills: init at 1.1.0”GitHub · Oct 3, 2026
- M4jor-Tom/claude-game-dev“build(deps): bump vendor/awesome-gamedev-agent-skills from `9ca5296` to `e86bec9`”GitHub · Sep 28, 2026
- AgentsLoop/OhMyGithub“Sky Courier airplane game with verified subagent critique loop /oc”GitHub · Aug 25, 2026
- AgentsLoop/OhMyGithub“OpenCode: ## Request”GitHub · Aug 25, 2026
The biggest 5 of 11 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 11
Talked about on GitHub (11 times).
On GitHub · 11
- Oct 5, 2026chore(deps): bump vendor/awesome-gamedev-agent-skills from `9ca5296` to `d4b0e35` — M4jor-Tom/claude-game-dev0 reactions
- Oct 3, 2026agent-skills.github.gamedev-skills.awesome-gamedev-agent-skills: init at 1.1.0 — sudosubin/agents.nix0 reactions
- Sep 28, 2026build(deps): bump vendor/awesome-gamedev-agent-skills from `9ca5296` to `e86bec9` — M4jor-Tom/claude-game-dev0 reactions · 1 comment
- Aug 25, 2026Sky Courier airplane game with verified subagent critique loop /oc — AgentsLoop/OhMyGithub0 reactions · 4 comments
- Aug 25, 2026OpenCode: ## Request — AgentsLoop/OhMyGithub0 reactions
6 more on GitHub
- Aug 25, 2026Airplane sky game with clouds and checkpoints /oc — AgentsLoop/OhMyGithub0 reactions · 8 comments
- Aug 5, 2026技能侦察 DIGEST 2026-08-05 16:00Z:+8 剩余类型包与 omer 精选 — NyphSan/CursorSkill0 reactions
- Aug 5, 2026技能侦察 DIGEST 2026-08-05 13:00Z:+8 CMC/网络/Niagara/编辑器/物理·性能·着色·输入 — NyphSan/CursorSkill0 reactions
- Aug 5, 2026技能侦察 DIGEST 2026-08-05 12:00Z:+8 Physics/Features/Data/Actor/Camera/Save/Procgen/Feel — NyphSan/CursorSkill0 reactions
- Aug 5, 2026技能侦察 DIGEST 2026-08-05 10:00Z:+8 Mover/BT/Input/Packaging/Mass/StateTree/Sequencer/Modeling — NyphSan/CursorSkill0 reactions
- Jul 7, 2026Audit candidate: gamedev-skills/awesome-gamedev-agent-skills — xiaolai/nlpm0 reactions · 3 comments
In this repository74 other files it gives its agents.
- routerSkill
- ai-behavior-trees-utility-aiSkill
- audio-designSkill
- camera-systemsSkill
- create-game-assetsSkill
- dialogue-systemsSkill
- game-aiSkill
- game-feelSkill
- game-ui-uxSkill
- input-systemsSkill
- level-designSkill
- performance-optimizationSkill
- physics-tuningSkill
- procedural-genSkill
- save-systemsSkill
- shader-programmingSkill
- card-gameSkill
- fps-shooterSkill
- platformerSkill
- puzzleSkill
- roguelikeSkill
- rpgSkill
- survival-craftingSkill
- tower-defenseSkill
- visual-novelSkill
- godot-2d-movementSkill
- godot-3d-essentialsSkill
- godot-animationSkill
- godot-audioSkill
- godot-csharpSkill
- godot-exportSkill
- godot-gdscript-headless-testingSkill
- godot-gdscriptSkill
- godot-multiplayerSkill
- godot-nodes-scenesSkill
- godot-physicsSkill
- godot-resourcesSkill
- godot-shadersSkill
- godot-signals-groupsSkill
- godot-tilemapSkill
- godot-ui-controlSkill
- bevy-ecsSkill
- love2d-coreSkill
- pygame-coreSkill
- roblox-charactersSkill
- roblox-datastoresSkill
- roblox-luauSkill
- roblox-networkingSkill
- roblox-physicsSkill
- roblox-studio-workflowSkill
- roblox-uiSkill
- unity-animationSkill
- unity-build-pipelineSkill
- unity-csharp-scriptingSkill
- unity-input-systemSkill
- unity-physicsSkill
- unity-scriptableobjectsSkill
- unity-tilemap-2dSkill
- unreal-behavior-treesSkill
- unreal-blueprintsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Use when an agent needs to walk/chase/patrol to a target, when baking a navigable surface, adding dynamic blockers (NavMeshObstacle), or …
- Very specific: line 24
Use when the project has the AI Navigation package, a NavMeshSurface component, or scripts using UnityEngine.AI.NavMeshAgent.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

