Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计通过

unity-mcp-orchestratorUnity MCP 编排器

Agent Skill

unity-mcp-orchestrator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,844

周安装

154

GitHub Stars

9,025

下载量

1,244
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:unity-mcp-orchestrator(Unity MCP 编排器)
来源仓库:https://github.com/coplaydev/unity-mcp
仓库路径:skills/unity-mcp-orchestrator
安装命令:
npx skills add https://github.com/coplaydev/unity-mcp --skill unity-mcp-orchestrator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/coplaydev/unity-mcp --skill unity-mcp-orchestrator

简介

unity-mcp-orchestrator 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。
  • 支持多源信息整合与内容筛选,提升检索效率。
  • 安装前需确认权限范围、维护状态及是否触发联网或命令执行。
  • 建议结合原始 README 核验具体功能与使用边界。

SKILL.md

Unity-MCP Operator Guide

This skill helps you effectively use the Unity Editor with MCP tools and resources.

Template Notice

Examples in references/workflows.md and references/tools-reference.md are reusable templates. They may be inaccurate across Unity versions, package setups (UGUI/TMP/Input System), and project-specific conventions. Please check console, compilation errors, or use screenshot after implementation.

Before applying a template:

  • Validate targets/components first via resources and find_gameobjects.
  • Treat names, enum values, and property payloads as placeholders to adapt.

Quick Start: Resource-First Workflow

Always read relevant resources before using tools. This prevents errors and provides the necessary context.

1. Check editor state     → mcpforunity://editor/state
2. Understand the scene   → mcpforunity://scene/gameobject-api
3. Find what you need     → find_gameobjects or resources
4. Take action            → tools (manage_gameobject, create_script, script_apply_edits, apply_text_edits, validate_script, delete_script, get_sha, etc.)
5. Verify results         → read_console, manage_camera(action="screenshot"), resources

Critical Best Practices

1. After Writing/Editing Scripts: Wait for Compilation and Check Console

# After create_script or script_apply_edits:
# Both tools already trigger AssetDatabase.ImportAsset + RequestScriptCompilation automatically.
# No need to call refresh_unity — just wait for compilation to finish, then check console.

# 1. Poll editor state until compilation completes
# Read mcpforunity://editor/state → wait until is_compiling == false

# 2. Check for compilation errors
read_console(types=["error"], count=10, include_stacktrace=True)

Why: Unity must compile scripts before they're usable. create_script and script_apply_edits already trigger import and compilation automatically — calling refresh_unity afterward is redundant.

2. Use batch_execute for Multiple Operations

# 10-100x faster than sequential calls
batch_execute(
    commands=[
        {"tool": "manage_gameobject", "params": {"action": "create", "name": "Cube1", "primitive_type": "Cube"}},
        {"tool": "manage_gameobject", "params": {"action": "create", "name": "Cube2", "primitive_type": "Cube"}},
        {"tool": "manage_gameobject", "params": {"action": "create", "name": "Cube3", "primitive_type": "Cube"}}
    ],
    parallel=True  # Hint only: Unity may still execute sequentially
)

Max 25 commands per batch by default (configurable in Unity MCP Tools window, max 100). Use fail_fast=True for dependent operations.

Tip: Also use batch_execute for discovery — batch multiple find_gameobjects calls instead of calling them one at a time:

batch_execute(commands=[
    {"tool": "find_gameobjects", "params": {"search_term": "Camera", "search_method": "by_component"}},
    {"tool": "find_gameobjects", "params": {"search_term": "Player", "search_method": "by_tag"}},
    {"tool": "find_gameobjects", "params": {"search_term": "GameManager", "search_method": "by_name"}}
])

3. Use Screenshots to Verify Visual Results

# Basic screenshot (saves to Assets/, returns file path only)
manage_camera(action="screenshot")

# Inline screenshot (returns base64 PNG directly to the AI)
manage_camera(action="screenshot", include_image=True)

# Use a specific camera and cap resolution for smaller payloads
manage_camera(action="screenshot", camera="MainCamera", include_image=True, max_resolution=512)

# Batch surround: captures front/back/left/right/top/bird_eye around the scene
manage_camera(action="screenshot", batch="surround", max_resolution=256)

# Batch surround centered on a specific object
manage_camera(action="screenshot", batch="surround", view_target="Player", max_resolution=256)

# Positioned screenshot: place a temp camera and capture in one call
manage_camera(action="screenshot", view_target="Player", view_position=[0, 10, -10], max_resolution=512)

# Scene View screenshot: capture what the developer sees in the editor
manage_camera(action="screenshot", capture_source="scene_view", include_image=True)

# Scene View framed on a specific object
manage_camera(action="screenshot", capture_source="scene_view", view_target="Canvas", include_image=True)

Best practices for AI scene understanding:

  • Use include_image=True when you need to *see* the scene, not just save a file.
  • Use batch="surround" for a comprehensive overview (6 angles, one command).
  • Use view_target/view_position to capture from a specific viewpoint without needing a scene camera.
  • Use capture_source="scene_view" to see the editor viewport (gizmos, wireframes, grid).
  • Keep max_resolution at 256–512 to balance quality vs. token cost.
# Agentic camera loop: point, shoot, analyze
manage_gameobject(action="look_at", target="MainCamera", look_at_target="Player")
manage_camera(action="screenshot", camera="MainCamera", include_image=True, max_resolution=512)
# → Analyze image, decide next action

# Multi-view screenshot (6-angle contact sheet)
manage_camera(action="screenshot_multiview", max_resolution=480)

# Scene View for editor-level inspection (shows gizmos, debug overlays, etc.)
manage_camera(action="screenshot", capture_source="scene_view", view_target="Player", include_image=True)

4. Check Console After Major Changes

read_console(
    action="get",
    types=["error", "warning"],  # Focus on problems
    count=10,
    format="detailed"
)

5. Always Check editor_state Before Complex Operations

# Read mcpforunity://editor/state to check:
# - is_compiling: Wait if true
# - is_domain_reload_pending: Wait if true
# - ready_for_tools: Only proceed if true
# - blocking_reasons: Why tools might fail

Parameter Type Conventions

These are common patterns, not strict guarantees. manage_components.set_property payload shapes can vary by component/property; if a template fails, inspect the component resource payload and adjust.

Vectors (position, rotation, scale, color)

# Both forms accepted:
position=[1.0, 2.0, 3.0]        # List
position="[1.0, 2.0, 3.0]"     # JSON string

Booleans

# Both forms accepted:
include_inactive=True           # Boolean
include_inactive="true"         # String

Colors

# Auto-detected format:
color=[255, 0, 0, 255]         # 0-255 range
color=[1.0, 0.0, 0.0, 1.0]    # 0.0-1.0 normalized (auto-converted)

Paths

# Assets-relative (default):
path="Assets/Scripts/MyScript.cs"

# URI forms:
uri="mcpforunity://path/Assets/Scripts/MyScript.cs"
uri="file:///full/path/to/file.cs"

Core Tool Categories

CategoryKey ToolsUse For
Scenemanage_scene, find_gameobjectsScene operations, finding objects
Objectsmanage_gameobject, manage_componentsCreating/modifying GameObjects
Scriptscreate_script, script_apply_edits, validate_scriptC# code management (auto-refreshes on create/edit)
Assetsmanage_asset, manage_prefabsAsset operations. Prefab instantiation is done via manage_gameobject(action="create", prefab_path="..."), not manage_prefabs.
Editormanage_editor, execute_menu_item, read_consoleEditor control, package deployment (deploy_package/restore_package actions)
Testingrun_tests, get_test_jobUnity Test Framework
Batchbatch_executeParallel/bulk operations
Cameramanage_cameraCamera management (Unity Camera + Cinemachine). Tier 1 (always available): create, target, lens, priority, list, screenshot. Tier 2 (requires com.unity.cinemachine): brain, body/aim/noise pipeline, extensions, blending, force/release. 7 presets: follow, third_person, freelook, dolly, static, top_down, side_scroller. Resource: mcpforunity://scene/cameras. Use ping to check Cinemachine availability. See tools-reference.md.
Graphicsmanage_graphicsRendering and post-processing management. 33 actions across 5 groups: Volume (create/configure volumes and effects, URP/HDRP), Bake (lightmaps, light probes, reflection probes, Edit mode only), Stats (draw calls, batches, memory), Pipeline (quality levels, pipeline settings), Features (URP renderer features: add, remove, toggle, reorder). Resources: mcpforunity://scene/volumes, mcpforunity://rendering/stats, mcpforunity://pipeline/renderer-features. Use ping to check pipeline status. See tools-reference.md.
Packagesmanage_packagesInstall, remove, search, and manage Unity packages and scoped registries. Query actions: list installed, search registry, get info, ping, poll status. Mutating actions: add/remove packages, embed for editing, add/remove scoped registries, force resolve. Validates identifiers, warns on git URLs, checks dependents before removal (force=true to override). See tools-reference.md.
Physicsmanage_physicsManage 3D and 2D physics (21 actions). Settings, collision matrix, materials, joints (14 types). Queries: raycast, raycast_all, linecast, shapecast (sphere/box/capsule sweep), overlap. Forces: apply_force (AddForce/AddTorque/AddExplosionForce with ForceMode). Rigidbody: get_rigidbody, configure_rigidbody (mass, drag, gravity, constraints, collision detection). Validation: scene-wide checks. Simulation: simulate_step in edit mode. See tools-reference.md.
ProBuildermanage_probuilder3D modeling, mesh editing, complex geometry. When com.unity.probuilder is installed, prefer ProBuilder shapes over primitive GameObjects for editable geometry, multi-material faces, or complex shapes. Supports 12 shape types, face/edge/vertex editing, smoothing, and per-face materials. See ProBuilder Guide.
UImanage_ui, batch_execute with manage_gameobject + manage_componentsUI Toolkit: Use manage_ui to create UXML/USS files, attach UIDocument, inspect visual trees. uGUI (Canvas): Use batch_execute for Canvas, Panel, Button, Text, Slider, Toggle, Input Field. Read mcpforunity://project/info first to detect uGUI/TMP/Input System/UI Toolkit availability. (see UI workflows)
Docsunity_reflect, unity_docsAPI verification and documentation lookup. unity_reflect inspects live C# APIs via reflection (requires Unity connection): search types across assemblies, get_type for member summary, get_member for full signatures. unity_docs fetches official docs from docs.unity3d.com (no Unity connection needed): get_doc (ScriptReference), get_manual (Manual pages), get_package_doc (package docs), lookup (parallel search all sources + project assets). Trust hierarchy: reflection > project assets > docs. Workflow: unity_reflect search -> get_type -> get_member -> unity_docs lookup. See tools-reference.md.

Common Workflows

Creating a New Script and Using It

# 1. Create the script (automatically triggers import + compilation)
create_script(
    path="Assets/Scripts/PlayerController.cs",
    contents="using UnityEngine;\n\npublic class PlayerController : MonoBehaviour\n{\n    void Update() { }\n}"
)

# 2. Wait for compilation to finish
# Read mcpforunity://editor/state → wait until is_compiling == false

# 3. Check for compilation errors
read_console(types=["error"], count=10)

# 4. Only then attach to GameObject
manage_gameobject(action="modify", target="Player", components_to_add=["PlayerController"])

Finding and Modifying GameObjects

# 1. Find by name/tag/component (returns IDs only)
result = find_gameobjects(search_term="Enemy", search_method="by_tag", page_size=50)

# 2. Get full data via resource
# mcpforunity://scene/gameobject/{instance_id}

# 3. Modify using the ID
manage_gameobject(action="modify", target=instance_id, position=[10, 0, 0])

Running and Monitoring Tests

# 1. Start test run (async)
result = run_tests(mode="EditMode", test_names=["MyTests.TestSomething"])
job_id = result["job_id"]

# 2. Poll for completion
result = get_test_job(job_id=job_id, wait_timeout=60, include_failed_tests=True)

Pagination Pattern

Large queries return paginated results. Always follow next_cursor:

cursor = 0
all_items = []
while True:
    result = manage_scene(action="get_hierarchy", page_size=50, cursor=cursor)
    all_items.extend(result["data"]["items"])
    if not result["data"].get("next_cursor"):
        break
    cursor = result["data"]["next_cursor"]

Multi-Instance Workflow

When multiple Unity Editors are running:

# 1. List instances via resource: mcpforunity://instances
# 2. Set active instance
set_active_instance(instance="MyProject@abc123")
# 3. All subsequent calls route to that instance

Error Recovery

SymptomCauseSolution
Tools return "busy"Compilation in progressWait, check editor_state
"stale_file" errorFile changed since SHARe-fetch SHA with get_sha, retry
Connection lostDomain reloadWait ~5s, reconnect
Commands fail silentlyWrong instanceCheck set_active_instance

Reference Files

For detailed schemas and examples:

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.17%
按下载量换算450

Claude

27.75%
按下载量换算345

Cursor

20.8%
按下载量换算259

Gemini CLI

10.06%
按下载量换算125

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills