Communitygithub.com

unity-technologies/initialize-ai-navigation

Sets up and configures the Unity AI Navigation system — NavMesh surfaces, NavMesh agents, obstacles, links, modifiers, areas and costs. Use when creating walkable navigation meshes, adding pathfinding agents, setting up patrol routes, configuring obstacle avoidance and carving, connecting separate NavMeshes with links, coupling navigation with animation, or troubleshooting navigation issues.

initialize-ai-navigation とは?

initialize-ai-navigation is a Claude Code agent skill that sets up and configures the Unity AI Navigation system — NavMesh surfaces, NavMesh agents, obstacles, links, modifiers, areas and costs. Use when creating walkable navigation meshes, adding pathfinding agents, setting up patrol routes, configuring obstacle avoidance and carving, connecting separate NavMeshes with links, coupling navigation with animation, or troubleshooting navigation issues.

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/unity-technologies/skills/tree/main/skills/initialize-ai-navigation

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

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 eval

eval compiles a statement block, not a file. Two consequences, both of which cause a compile error rather than a warning:

  • No using directives. The compiler reads using UnityEngine; as a resource-disposal statement and rejects it (CS0210).
  • Types must be fully qualified. A bare AssetDatabase or Volume does not resolve (CS0246 / CS0103), and a bare Object is ambiguous with object (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 eval.

Routing Logic

User SaysInterpretation
"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

Workflow

0. Package Installation Check

Before doing anything else, verify that com.unity.ai.navigation is installed. If it's missing, add it to Packages/manifest.json under dependencies — Unity resolves it when the Editor next regains focus, and this needs no Editor connection:

"com.unity.ai.navigation": "<current 2.x version>"

Don't invent the version string. Read the current one from the Unity registry — https://packages.unity.com/com.unity.ai.navigation lists every published version — or copy the version an adjacent Unity package in this manifest already uses. A version that doesn't exist makes Unity fail resolution silently, so a wrong guess looks like nothing happened.

Proceed only once it's confirmed installed. If you have a live Editor to run C# in, see navigation-system.md for the Client.Add equivalent.

1. Pre-Flight: Assess Current Navigation Setup

Before making changes, inspect what already exists:

  1. Find the existing navigation components. With a connected Editor, query the live scene for NavMeshSurface, NavMeshAgent, NavMeshObstacle, NavMeshLink and NavMeshModifier — see the unity-cli skill for driving a running Editor. Without one, search the scene and prefab files for those component names.
  2. Check configured agent types via Window > AI > Navigation > Agents tab.
  3. Summarize ALL detected navigation components before proposing changes.

2. Gather Missing Information

Before creating components, ensure the user has specified: walkable surfaces, agent type/size, agent behavior, obstacles, links, and area/cost requirements. Ask if anything is unclear. See the Information Gathering Checklist in the reference for full details.

3. Planning & Execution

Follow this general order. See the Component Setup Guide in the reference for detailed step-by-step instructions per component:

  1. NavMesh Surface — create the walkable mesh (bake it)
  2. NavMesh Agent — add pathfinding characters
  3. NavMesh Obstacle — add dynamic obstacles
  4. NavMesh Link — connect disconnected NavMesh areas
  5. NavMesh Modifier / Modifier Volume — fine-tune area types
  6. Scripts — movement, patrol, click-to-move, animation coupling (see Common Recipes in reference)

4. Validation

After setup, confirm:

  • NavMesh is baked and visible (blue overlay)
  • NavMeshSurface agent type matches NavMeshAgent agent type
  • Agents have a valid path to their destination
  • Obstacles carve or obstruct correctly
  • Links have both ends connected and Activated is enabled
  • Area masks allow the intended movement
  • No conflicting components (see Mixing Components Guide in reference)
  • If using Rigidbody with NavMeshAgent, Is Kinematic is enabled

5. Final Confirmation

Summarize what was created or changed:

  • NavMesh Surfaces: which GameObject, agent type, geometry mode, bake status
  • NavMesh Agent(s): which GameObject, speed, stopping distance, area mask
  • NavMesh Obstacle(s): which GameObject, shape, carve on/off
  • NavMesh Link(s): start/end, bidirectional, area type
  • Scripts: which scripts attached to which GameObjects
  • Any manual steps required (adjust waypoints, re-bake after scene changes, etc.)

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

unity-technologies/2d-pixel-perfect

Sets up, diagnoses, and fixes pixel perfect 2D rendering in Unity projects. Use when working on any retro-style or pixel art 2D game.

unity-technologies/audio-setup-mixers

Scans the scene and audio assets to appropriately route Audio Sources into existing Audio Mixer Groups, classifying each source by what it plays. Use when the user asks about cleaning up mixer assignments, routing audio through a mixer, or which group a sound belongs in. Creating mixers and groups, and setting volumes, are not automated — the skill inventories what exists and asks the user to add anything missing.

unity-technologies/build-live-game

Build and operate a live game using Unity Services. Use when the user needs to implement, connect, or debug backend-driven features — battle passes, achievements, player progression, cloud saves, leaderboards, matchmaking, virtual economies, server-authoritative logic, anti-cheat, player accounts and authentication, remote configuration, feature flags, A/B testing, analytics, or cloud resource deployment. Triggers on live-ops, live service, backend, server authority, cloud code, cloud save, remote config, player data, retention, monetization loop, season pass, ranking, multiplayer sessions, lobbies, or any Unity Services integration.

unity-technologies/generate-editor-search-query

Generates Unity Search / Quick Search queries and opens the Unity Search window for read-only Unity Editor asset or scene-object lookup requests. Always use when the user asks to find, search, show, locate, filter, look up, query, or list concrete assets or scene objects in the current project or scene, even if Unity Search is not named. Covers materials, textures, prefabs, scenes, scripts, shaders, GameObjects, components, Lights, Cameras, UI objects, labels, paths, references, selected or named assets, and asset types. Also use when the user explicitly mentions Unity Search, Quick Search, Search window, open Search, or asks what Unity Search query to use. Do not use for general project overview, project structure, folder-purpose summaries, gameplay/system explanations, how-to programming questions, web search, repository text search, build logs, package installation, menu or settings search, modifying results, or non-Unity filesystem search unless the user explicitly asks to use Unity Search.

unity-technologies/implement-in-app-purchases

Implement, configure, and debug Unity In-App Purchases (IAP) — store connection, product catalog, consumable/non-consumable/subscription purchases, two-step pending-confirm flow, receipt validation, entitlement checking, restore transactions, Apple extensions (promotional purchases, Ask-to-Buy, code redemption), and Google Play extensions (subscription upgrade/downgrade), D2C Capabilities(direct to customer), 3rd party payment provider (Stripe/Coda) via Unity IAP/Unity Cloud. Use when the user needs to add, modify, debug, or migrate from native Android/iOS billing, 3rd party packages(RevenueCat/Adapty/Essential Kit/Unipay supported) to IAP. Triggers on microtransactions (MTX), monetization, real-money purchases, store purchases, buying items, support D2C, purchase via Stripe/Coda, migrate from native billing(Google's BillingClient or Apple's StoreKit/SKPaymentQueue/SKProduct)/RevenueCat/Adapty/EssentialKit/Unipay.

unity-technologies/levelplay-unity-integration

Integrates the LevelPlay Mediation SDK via the Ads Mediation UPM package. Use when a developer asks about adding ads to a Unity game, implementing rewarded, interstitial, or banner ads, setting up ad mediation, configuring ad networks, installing or updating the Ads Mediation package, troubleshooting LevelPlay namespace errors, resolving Android gradle or iOS CocoaPods dependency issues for ads, configuring ATT or privacy settings for ad compliance, tracking impression-level revenue (ILRD), initializing the LevelPlay SDK, or setting up ad unit IDs. Also use when a developer wants to monetize their Unity game with ads, asks how to get started with LevelPlay, ads, or mediation, or needs help with any part of the LevelPlay integration workflow including platform-specific setup for iOS or Android. Also use when upgrading the LevelPlay or IronSource SDK version, migrating from deprecated IronSource.Agent APIs, or migrating a game from Unity Ads to LevelPlay.

unity-technologies/localization

Sets up and configures Unity Localization, including locales, String/Asset Tables, CJK font support, and Addressables workflows. Use when the user wants to add languages to a project, translate UI text, support Asian (CJK) languages with TMP fonts, or mentions i18n, l10n, multilingual support, or making a game support multiple languages.

unity-technologies/manage-sprite-atlas

Manage SpriteAtlas using prebuild pipeline with IPreprocessBuildWithReport (DEFAULT approach). Use it to configure master atlases, variant atlases, texture settings, packing settings, and platform-specific configurations. Use when the user asks about creating sprite atlases, optimizing sprites, configuring atlas settings, adding sprites to atlases, creating variant atlases, implementing automated atlas generation, or runtime sprite atlas access. Always use prebuild approach unless user explicitly requests manual authoring.

unity-technologies/migrate-birp-to-urp

Plans, executes, and troubleshoots Unity projects moving from the Built-in Render Pipeline (BiRP/BIRP/Built-in RP) to the Universal Render Pipeline (URP). Use when the user asks to upgrade, convert, switch, or migrate a project, scene, material, or shader to URP/Universal Render Pipeline; fix pink or magenta materials after URP; convert Built-in materials/shaders; move a 2D project to URP 2D; review lighting, quality, post-processing, baked lightmaps, or reflection probes after URP; or diagnose visual problems after a render-pipeline migration.

関連スキル