Skip to content

77 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 launched as Claude Skills), with a router that loads the right skill for your engine and task. Runs in Claude Code, Cursor, Kiro, Codex, Copilot, Gemini CLI and more.

fix(unity): navmesh notes the package Navigation window and agent/Rigidbody/obstacle mixing rules

Kiro Crewd7af7c940e77
diff --git a/skills/unity/unity-navmesh/SKILL.md b/skills/unity/unity-navmesh/SKILL.md
index 2c55a7b..402564d 100644
--- a/skills/unity/unity-navmesh/SKILL.md
+++ b/skills/unity/unity-navmesh/SKILL.md
@@ -10,10 +10,11 @@ description: >
# 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**.
+Targets **Unity 6.3 LTS (6000.3)** with the **AI Navigation package 2.0** (2.0.16 at last check).
-> **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**
+> **Version trap (Unity 2022+/6):** the old built-in **Navigation window** (Object/Bake tabs,
+> "Navigation Static" flag) is gone. The package's **Window → AI → Navigation** only holds the
+> Agents and Areas tabs. 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`.
@@ -33,7 +34,8 @@ kinematic movement that isn't pathfinding → `unity-physics`.
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,
- `NavMeshModifier`s, or agent settings change.
+ `NavMeshModifier`s, or agent settings change. Agent types (radius, height, step, slope)
+ are defined in **Window → AI → Navigation → Agents**.
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
@@ -114,14 +116,23 @@ public void RebuildNav() => surface.BuildNavMesh();
## Pitfalls
-- **Looking for the Navigation window** — it no longer exists in Unity 6. Use the AI Navigation
- package's `NavMeshSurface` component + Bake.
+- **Looking for the Bake tab or the Navigation Static flag** — the old Navigation window was
+ removed in AI Navigation 2.0. Bake from a `NavMeshSurface` component; the package's
+ Window → AI → Navigation only edits agent types and areas.
- **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.
+- **An NPC with a Rigidbody jitters or drifts off its path** — a `NavMeshAgent` and a
+ non-kinematic `Rigidbody` both move the transform. Tick **Is Kinematic** while the agent
+ is in control.
+- **An agent with a `NavMeshObstacle` on the same GameObject spins or slides** — it tries to
+ avoid itself (worse with carving). Keep only one of them enabled at a time, e.g. switch the
+ agent off and the obstacle on when the NPC stops for good.
+- **Teleporting an agent** — use `agent.Warp(position)` (returns false if it fails), not a
+ plain Transform write.
- **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
@@ -142,7 +153,9 @@ public void RebuildNav() => surface.BuildNavMesh();
the `NavMeshLink` page
(`https://docs.unity3d.com/Packages/[email protected]/manual/NavMeshLink.html`)
and its "What's new" note on the `OffMeshLink` deprecation
- (`https://docs.unity3d.com/Packages/[email protected]/manual/whats-new.html`), plus
+ (`https://docs.unity3d.com/Packages/[email protected]/manual/whats-new.html`), the
+ "Navigation window" and "Use NavMesh Agent with other components" pages
+ (`NavigationWindow.html`, `MixingComponents.html` in the same manual), plus
`ScriptReference/AI.NavMeshAgent`, `ScriptReference/AI.NavMesh`.
## Related skills