navmesh
Bake, configure, and query Unity's NavMesh for AI navigation, including pathfinding, obstacle management, and agent settings.
Instructions
Manage Unity NavMesh navigation system. Actions:
bake: Bake the NavMesh for the current scene
clear: Clear all NavMesh data
get_settings: Get NavMesh agent settings (radius, height, slope, climb)
set_settings: Modify NavMesh agent settings
get_areas: List NavMesh area names and costs
set_area: Set area cost by index
get_agents: List all NavMeshAgent components in scene
add_agent: Add/configure NavMeshAgent on a GameObject
find_path: Calculate a path between two positions
sample_position: Find the nearest NavMesh point to a position
get_obstacles: List all NavMeshObstacle components
add_obstacle: Add NavMeshObstacle to a GameObject
get_surfaces: List NavMeshSurface components (AI Navigation package)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position for sample_position | |
| y | No | Y position for sample_position | |
| z | No | Z position for sample_position | |
| to | No | End position JSON for find_path: {"x":0,"y":0,"z":0} | |
| cost | No | Area traversal cost | |
| from | No | Start position JSON for find_path: {"x":0,"y":0,"z":0} | |
| range | No | Search range for sample_position | |
| shape | No | Obstacle shape: box or capsule | |
| speed | No | Agent movement speed | |
| action | Yes | NavMesh action to perform | |
| carving | No | Enable carving on obstacle (true/false) | |
| objectId | No | Instance ID of a GameObject | |
| areaIndex | No | NavMesh area index (0-31) | |
| agentClimb | No | Step height for settings | |
| agentSlope | No | Max slope angle for settings | |
| objectPath | No | Hierarchy path of a GameObject | |
| agentHeight | No | Agent height for settings | |
| agentRadius | No | Agent radius for settings | |
| acceleration | No | Agent acceleration | |
| angularSpeed | No | Agent turning speed | |
| stoppingDistance | No | Distance to stop from target |