Skip to main content

unity-debug-testing

Reproduce, diagnose, fix, and regression-test Unity failures through Unity MCP. Use for C# compile errors, console exceptions, failing EditMode or PlayMode tests, broken scenes or prefabs, missing references, physics bugs, input or UI failures, package and domain-reload issues, incorrect runtime behavior, build failures that require root-cause analysis, and requests to debug, troubleshoot, or verify a Unity fix.

来源信息

仓库
pirate-608/codex-plugins
最近来源活动
2026年8月10日 14:24
检测到的 SKILL.md 语言
英语
星标
0
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
unity-debug-testing
description
Reproduce, diagnose, fix, and regression-test Unity failures through Unity MCP. Use for C# compile errors, console exceptions, failing EditMode or PlayMode tests, broken scenes or prefabs, missing references, physics bugs, input or UI failures, package and domain-reload issues, incorrect runtime behavior, build failures that require root-cause analysis, and requests to debug, troubleshoot, or verify a Unity fix.
# Unity Debugging & Testing Diagnose from evidence, make the smallest justified fix, and prove the original failure no longer reproduces. ## Diagnostic Loop 1. Capture the exact symptom, expected behavior, reproduction steps, affected scene/platform, and whether the failure is deterministic. 2. Read editor state and confirm the intended Unity instance. Wait out compilation or domain reload. 3. Read console errors with stack traces. Preserve the first causal error; later errors may be cascades. 4. Inspect the implicated object, component, script, prefab, package, physics layer, or UI tree. 5. Reproduce with the narrowest action: open scene, run one test, enter Play mode, invoke one interaction, or perform one query. 6. Form a falsifiable hypothesis and gather one more piece of evidence before editing. 7. Apply the smallest fix with SHA-aware script edits or Editor-managed asset changes. 8. Wait for compilation, clear only when useful, reproduce again, then run targeted regression tests. 9. Check the console once more and capture visual evidence for rendering or UI issues. ## Failure Routing - Compilation: inspect the earliest compiler error, verify API signatures with `unity_reflect`, edit, and wait for a complete recompile. - Tests: use `run_tests`, poll the job, inspect failed test names/messages/stacks, and rerun the single failure before the suite. - Missing references: inspect the live component or prefab; do not patch serialized YAML. - Physics: inspect dimension, body type, colliders, triggers, layers, matrix, materials, and query results before changing code. - UI: inspect the visual tree or Canvas hierarchy, EventSystem/input module, layout, raycast targets, and focus/navigation. - Domain reload/connection: wait for ready state, reselect the instance if necessary, and retry idempotent reads before writes. - Stale script edit: obtain a fresh SHA and reapply against the current file; never force an overwrite. ## Test Design - Add a regression test when the bug has a stable programmatic assertion. - Use EditMode for pure logic and asset/editor behavior; use PlayMode for lifecycle, scene, physics, timing, and interaction behavior. - Keep tests deterministic and restore global settings or created assets. - Report untested manual behavior explicitly. ## Completion Gate Require the original reproduction to pass, targeted tests to pass, no new console errors, and an explanation connecting evidence, root cause, fix, and regression coverage. Read the shared [tool reference](../unity-mcp-skill/references/tools-reference.md) for console, test, resource, physics, script, and reflection tools.
在 GitHub 查看