# AI Navigation — Unity Extension

AI Navigation (com.ivanmurzak.unity.mcp.navigation) — NavMesh — add and bake NavMeshSurface, bake settings, modifiers/volumes, links, and agents + destinations. An AI Game Developer extension for Unity that adds 4 capabilities through RQL (no extra MCP tools).

_Last updated: 2026-10-17_

## At a glance

| Field | Value |
| --- | --- |
| Capabilities | 4 capabilities |
| Version | 2.0.0 |
| Package id | com.ivanmurzak.unity.mcp.navigation |
| Engine | Unity · Unity 2022.3+ |
| Base plugin | com.ivanmurzak.unity.mcp |
| Wraps | com.unity.ai.navigation |
| Repository | https://github.com/IvanMurzak/Unity-MCP/blob/main/extensions/Navigation/README.md |
| RQL sources | navigation |
| RQL functions | — |
| RQL types | NavMeshSurface, NavMeshModifier, NavMeshModifierVolume, NavMeshLink, NavMeshAgent |

## How it works

Adds no MCP tools: it contributes an RQL module with the navigation source and adapters for NavMeshSurface, NavMeshModifier, NavMeshModifierVolume, NavMeshLink, NavMeshAgent. That powers 4 capabilities the agent reaches through rql-query / rql-mutate.

- NavMesh components — Add NavMeshSurfaces, agents, links, modifiers and modifier volumes, and edit them using agent-type and area names instead of ids. RQL: `objects | where name == "Ground" | call AddComponent("NavMeshSurface")`
- Bake the NavMesh — Bake or clear one surface, or every surface at once. RQL: `navigation | call BakeAll()`
- Bake settings & areas — Change agent radius, height and slope per agent type and voxel size per surface, and read the areas with their costs. RQL: `navigation | get agentTypes | where name == "Humanoid" | set agentRadius = 0.4, agentSlope = 40`
- Move agents — In Play Mode, send NavMeshAgents to a destination, warp them, or reset their path. RQL: `objects | get components | where $ is NavMeshAgent | call SetDestination("(10, 0, 5)")`

## Install

Requires the base plugin com.ivanmurzak.unity.mcp. After installing, the RQL module loads with the package — the agent sees it in rql-schema.

```bash
openupm add com.ivanmurzak.unity.mcp.navigation
```

## When to ask the AI for it

Ask for AI pathfinding and navigation — bake a NavMesh, drop a NavMeshAgent, set a destination.

Not sure if it's installed? Ask the agent to run rql-schema — the navigation source only exists when the package is present.

## Example prompts

1. Add a NavMeshSurface to the `Level` object and bake the NavMesh.
2. Add a NavMeshAgent to the `Enemy` and set its destination to the `Player`.

---

Source (HTML): https://ai-game.dev/docs/extensions/unity/navigation
