Initialize AI Navigation
Sets up and configures Unity AI Navigation, including NavMesh surfaces, agents...
Install
npx skills add Unity-Technologies/skills --skill initialize-ai-navigation -g -a claude-code -y- Repository
- Unity-Technologies/skills1.2k
- Category
- AI and agents
- Updated
- 5d ago
- License
- See repository
- Context cost
- Lightabout 1,258 tokens
- Runs scripts
- No, instructions only
What it does
Sets up and configures Unity AI Navigation, including NavMesh surfaces, agents, obstacles, and links. Use when the user asks about navigation meshes, pathfinding, patrol routes, or obstacle avoidance.
Determine what the user needs and guide them through navigation setup. See navigation-system.md for expanded component details, API notes, code recipes, and troubleshooting.
Passing C# to script eval
script eval compiles a statement block, not a file. Two consequences, both of which cause a
compile error rather than a warning:
- No
usingdirectives. The compiler readsusing UnityEngine;as a resource-disposal statement and rejects it (CS0210). - Types must be fully qualified. A bare
AssetDatabaseorVolumedoes not resolve (CS0246/CS0103), and a bareObjectis ambiguous withobject(CS0104).
Where a snippet below is written as a file, with usings, for readability, or because it is
meant to be saved into the project, qualify the types before passing it to script eval.
Routing Logic
| User Says | Interpretation |
|---|---|
| "add navigation" / "set up nav" | Full setup: NavMeshSurface + bake + NavMeshAgent |
| "make this character navigate" | Add NavMeshAgent, ensure NavMesh exists |
| "add pathfinding" | NavMeshAgent + movement script |
| "agent won't move" / "path not found" | Troubleshoot, see Troubleshooting Decision Tree in reference |
| "avoid obstacles" | NavMeshObstacle with carving or avoidance |
| "connect two areas" / "jump across" | NavMeshLink between areas |
| "patrol between points" | NavMeshAgent + patrol script |
| "click to move" | NavMeshAgent + raycast click-to-move script |
| "animate the character while navigating" | Couple Animator with NavMeshAgent |
| "different agent sizes" | Configure agent types in Navigation window |
| "areas and costs" / "restrict areas" | NavMesh area types, modifiers, and agent area masks |

