<< All versions
Skill v1.0.1
currentAutomated scan100/100bigdra50/unity-cli/unity-perf
1 files
──Details
PublishedMay 28, 2026 at 07:46 AM
Content Hashsha256:16353db56dc62edf...
Git SHA68692892e902
Bump Typepatch
──Files
Files (1 file, 2.2 KB)
SKILL.md2.2 KBactive
SKILL.md · 62 lines · 2.2 KB
version: "1.0.1" name: unity-perf description: | パフォーマンス計測ワークフロー。プロファイリング、GC 分析、最適化提案。 Use for: "パフォーマンス", "プロファイル", "FPS", "GC", "最適化", "ボトルネック" license: MIT compatibility: Requires u CLI (unity-cli) and active Unity Editor via Relay Server. metadata: openclaw: category: "game-development" user-invocable: true requires: bins: ["u"]
unity-perf
PREREQUISITE:../unity-shared/SKILL.md(Relay Server 経由で Unity Editor が起動/アクティブであること)skill 経由のコマンドは必ず-i <instance>を付ける (unity-shared #インスタンス指定)。
プロファイリングフロー
text
1. /unity-verify Quick Verify コンパイルエラーがないことを確認2. u -i <instance> play Play Mode 開始3. u -i <instance> profiler start プロファイリング開始4. 計測 (数秒〜数十秒)5. u -i <instance> profiler snapshot スナップショット取得u -i <instance> profiler frames --count 10 フレームデータ取得6. u -i <instance> profiler stop 停止7. u -i <instance> stop Play Mode 終了8. 分析 → 最適化提案
コマンド
bash
u -i <instance> profiler start # 開始u -i <instance> profiler stop # 停止u -i <instance> profiler snapshot # 現在のスナップショットu -i <instance> profiler frames --count 10 # 直近Nフレーム
分析パターン
| ボトルネック | 確認方法 | 対策 | |
|---|---|---|---|
| CPU | frames の処理時間 | ホットパスの最適化 | |
| GPU | frames の描画時間 | バッチング、LOD | |
| GC | frames の GC Alloc | オブジェクトプール、struct 化 | |
| メモリ | snapshot のメモリ使用量 | アセット圧縮、参照整理 |
最適化チェックリスト
- [ ] Update/LateUpdate 内の毎フレーム Alloc
- [ ] GetComponent の繰り返し呼び出し
- [ ] 文字列結合 (+ 演算子)
- [ ] LINQ in Update
- [ ] 不要な SetActive 切り替え