unity-navmesh

Bake Unity navigation meshes and calculate paths between coordinates.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/Yuan-Zzzz/FrogRE --skill unity-navmesh-yuan-zzzz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-navmesh
Source: https://github.com/Yuan-Zzzz/FrogRE/tree/main/.codex/skills/unity-skills/skills/navmesh
Command: npx skills add https://github.com/Yuan-Zzzz/FrogRE --skill unity-navmesh-yuan-zzzz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides deterministic Unity NavMesh operations to automate baking, pathfinding, agent and obstacle setup, and related scene-level navigation tasks, eliminating manual, error-prone configuration and troubleshooting for AI navigation.

Core Features & Use Cases

  • Synchronous NavMesh Baking & Clearing: Bake the NavMesh for the scene and clear NavMesh data when needed, with a warning that baking can be slow.
  • Path Calculation & Sampling: Compute paths between coordinates with area masks and sample the nearest point on the NavMesh.
  • Agent & Obstacle Management: Add and configure NavMeshAgent and NavMeshObstacle components programmatically, and adjust area traversal costs and build settings.
  • Use Case: In a Unity level update workflow, re-bake the NavMesh after geometry changes, add agents/obstacles to test avoidance, and calculate NPC patrol or pursuit routes.

Quick Start

Bake the NavMesh for the current scene and calculate a path from (0,1,0) to (10,1,5) using the default area mask.

Frequently Asked Questions about unity-navmesh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bake NavMesh and calculate AI paths between coordinates in Unity?

Unity NavMesh baking and pathfinding can be automated by synchronously baking the scene and computing paths between start and end coordinates using a default area mask to return structured path results.

Can I add and configure NavMeshAgent and NavMeshObstacle components programmatically?

Yes, you can programmatically add and configure NavMeshAgent and NavMeshObstacle components, adjust area traversal costs, and modify build settings to test agent avoidance and navigation dynamically.

What is the best way to re-bake NavMesh after geometry changes in a Unity level?

The best way to update Unity NavMesh after geometry changes is through synchronous NavMesh baking, which rebuilds the navigation mesh so NPCs can calculate accurate patrol or pursuit routes.

Does NavMesh baking work synchronously and can I clear NavMesh data when needed?

Yes, this approach supports synchronous NavMesh baking and clearing, though baking can be slow and requires a warning that performance may be impacted during scene updates.

How do I sample the nearest point on a NavMesh for accurate agent positioning?

NavMesh sampling computes the nearest point on the navigation mesh from given coordinates, ensuring AI agents are accurately positioned on valid walkable surfaces.

When do I need to tune area costs for AI navigation in Unity?

Area cost tuning is needed when adjusting NavMesh build settings to control how much agents prioritize or avoid specific surfaces, directly impacting pathfinding results and NPC route selection.