Borrowing it
Nothing to install: this file belongs to akiojin/unity-editor-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/akiojin/unity-editor-mcp/main/.claude/commands/fix-unity-console.mdgit clone --depth 1 https://github.com/akiojin/unity-editor-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/akiojin/unity-editor-mcp/fix-unity-console)<a href="https://agentmods.dev/commands/akiojin/unity-editor-mcp/fix-unity-console"><img src="https://agentmods.dev/badge/commands/akiojin/unity-editor-mcp/fix-unity-console/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/akiojin/unity-editor-mcp/fix-unity-console"><img src="https://agentmods.dev/badge/commands/akiojin/unity-editor-mcp/fix-unity-console.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01392 |
| Opus 5.5 | $0.00000 | $0.00557 |
| Sonnet 5.5 | $0.00000 | $0.00278 |
| Haiku 4.5 | $0.00000 | $0.00139 |
Grade A, and why
fix-unity-console scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/FixUnityConsole
Unityエディタのコンソール出力を確認し、エラーや警告を自動的に解決するコマンド
概要
このコマンドは、UnityMCPを利用してUnityエディタのコンソールログを取得・分析し、unity-architectが複数の専門サブエージェントに作業を分配して問題を並列で解決します。エラーの種類に応じて適切なサブエージェントが専門的な修正を実行します。
処理フロー
-
Unity Editor接続確認
- UnityMCPへの接続確認
- エディタの実行状態確認
- 接続エラー時の診断と対処法の提示
-
コンソールログ収集
- エラー、警告、アサートを取得
- タイムスタンプ順にソート
- 重複するエラーをグループ化
-
Unity側での再検証
- アセットの再インポート
- スクリプトの再コンパイル
- エラーが解消されたことを確認
-
作業完了報告
- 修正内容のサマリー
- 残存する問題の報告
- 手動対応が必要な項目の提示
エラータイプ別の対処法
コンパイルエラー
// エラー例: CS0246: 型または名前空間の名前 'Vector3' が見つかりませんでした
// 修正: using UnityEngine; を追加
Null参照例外
// エラー例: NullReferenceException: Object reference not set to an instance of an object
// 修正: null チェックの追加
if (component != null) {
component.DoSomething();
}
Missing参照
// エラー例: The referenced script on this Behaviour is missing!
// 修正:
// 1. スクリプトファイルを検索
// 2. GameObjectのコンポーネントを更新
// 3. プレハブを再保存
非推奨API
// エラー例: 'Application.LoadLevel' is obsolete
// 修正: SceneManager.LoadScene に置換
実装詳細
Unity接続確認
# UnityMCPの接続テスト
mcp__UnityMCP__ping
# エディタ状態の確認
mcp__UnityMCP__get_editor_state
ログ取得と分析
# エラーログの取得
mcp__UnityMCP__enhanced_read_logs --logTypes Error --count 100
# コンパイル状態の確認
mcp__UnityMCP__get_compilation_state
修正できない問題の処理
- プロジェクト設定の問題
- 外部アセットの互換性
- プラットフォーム固有の問題
- ライセンス関連のエラー
出力例
成功時の出力:
/FixUnityConsole
🔍 Unity Editorに接続中...
✅ 接続成功
📊 エディタ状態: Play Mode
📋 コンソールログを取得中...
⚠️ 警告: 15件
❌ エラー: 8件
🔴 アサート: 2件
🏗️ unity-architectが問題を分析中...
コンパイルエラー: 3件
Null参照例外: 2件
Missing参照: 3件
🔄 Unityで再コンパイル中...
✅ コンパイル成功
📊 最終結果:
修正済み: 8/8 エラー(5つのサブエージェントによる並列処理)
処理時間: 通常の1/5に短縮
残存エラー: 0件
✅ すべてのエラーが解決されました!
エラー時の出力:
/FixUnityConsole
🔍 Unity Editorに接続中...
❌ 接続失敗
⚠️ Unity Editorが起動していないか、UnityMCPが正しく設定されていません。
🔧 対処法:
1. Unity Editorが起動していることを確認
2. UnityMCPの設定を確認:
- .mcp.jsonでUnityMCPが有効になっているか
- ポート番号が正しいか(デフォルト: 5001)
3. Unity側でMCPパッケージがインポートされているか確認
📖 詳細なセットアップ手順:
https://github.com/your-repo/unity-mcp-setup
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 165 lines · 0 tokens per session scan A 63da118387b1
fix-unity-console is a command published in the GitHub repository akiojin/unity-editor-mcp (11 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,392 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
editor-lifecycle-and-observability
Commands to control Editor play mode, focus, and menus, and to observe the Editor's state, console, and performance.
debug-on-quest
Help debug this sample on a Meta Quest device.
bug-triage
Classify bugs, assign severity and priority, and propose next actions.
godot-build-fix
Diagnose and resolve Godot export, script, or project configuration issues.
unity-build-fix
Diagnose and resolve Unity build, editor, package, or configuration issues.
verify
Run a structured verification pass across implementation, quality, and risk.