From unity-cli
Debugging workflow for Unity C# runtime errors: NullReferenceException, MissingReferenceException, compile errors and console log analysis via `u` CLI.
How this skill is triggered — by the user, by Claude, or both
Slash command
/unity-cli:unity-debugThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **PREREQUISITE:** `../unity-shared/SKILL.md`(Relay Server 経由で Unity Editor が起動/アクティブであること)
PREREQUISITE:
../unity-shared/SKILL.md(Relay Server 経由で Unity Editor が起動/アクティブであること)skill 経由のコマンドは必ず
-i <instance>を付ける (unity-shared #インスタンス指定)。
1. エラー取得 u -i <instance> console get -l E,X | head -20
2. エラー分類 → コンパイルエラー / ランタイムエラー / Missing 系
3. コンテキスト収集 u -i <instance> scene hierarchy / u -i <instance> component inspect / u -i <instance> screenshot
4. 原因特定 → 修正 → /unity-verify で検証
| エラー種別 | 対応 |
|---|---|
| CS0XXX (コンパイルエラー) | コード修正 → /unity-verify |
| NullReferenceException | u -i <instance> scene hierarchy + u -i <instance> component inspect で参照確認 |
| MissingReferenceException | u -i <instance> asset info でアセット存在確認 |
| MissingComponentException | u -i <instance> component list で確認 → u -i <instance> component add |
u -i <instance> console get # 全ログ
u -i <instance> console get -l E | head -10 # Error のみ、先頭10件
u -i <instance> console get -l E,W # Error + Warning
u -i <instance> console clear # ログクリア
u -i <instance> screenshot # エディタのスクリーンショット
u -i <instance> scene hierarchy # 現在のシーン構造
u -i <instance> state # Play/Pause/Compile 状態
コンパイルエラーが解決しない場合は /unity-verify に切り替える。
npx claudepluginhub bigdra50/unity-cli --plugin unity-cliControls the Unity Editor from the terminal via the `ucp` CLI. Automates scenes, GameObjects, assets, builds, tests, packages, and profiling over a WebSocket/JSON-RPC bridge.
Explores and executes Unity API methods using `u api schema` for search and `u api call` for invoking public static methods. Fallback for operations not covered by existing CLI commands.
Detects and resolves Unity C# compilation errors from VSCode OmniSharp diagnostics, analyzes patterns for fixes, and handles version control conflicts.