From unity-cli
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/unity-cli:unity-apiThe 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 #インスタンス指定)。--offlineオプションのみ Relay 不要 =-i不要。
u -i <instance> api schema --type AssetDatabase # 型名でフィルタ
u -i <instance> api schema --namespace UnityEditor # 名前空間でフィルタ
u -i <instance> api schema --method Refresh # メソッド名で検索
u api schema --offline --type PlayerSettings # キャッシュから (Relay 不要なので -i 不要)
u -i <instance> api call UnityEngine.Application get_unityVersion
u -i <instance> api call UnityEditor.AssetDatabase Refresh
u -i <instance> api call UnityEditor.AssetDatabase ImportAsset --params '["Assets/Prefabs/Player.prefab", 0]'
u -i <instance> api call UnityEditor.EditorApplication ExecuteMenuItem --params '["Window/General/Console"]'
| 用途 | コマンド |
|---|---|
| プロジェクト設定 | u -i <instance> api call UnityEditor.PlayerSettings get_productName |
| コンパイル状態 | u -i <instance> api call UnityEditor.EditorApplication get_isCompiling |
| アセット存在確認 | u -i <instance> api call UnityEditor.AssetDatabase AssetPathExists --params '["Assets/..."]' |
| フォルダ作成 | u -i <instance> api call UnityEditor.AssetDatabase CreateFolder --params '["Assets", "New"]' |
| メニュー実行 | u -i <instance> api call UnityEditor.EditorApplication ExecuteMenuItem --params '["Tools/..."]' |
既存コマンド (u scene, u build 等) がある操作はそちらを使う。u api は既存コマンドがカバーしない操作のためのフォールバック。
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.
Manages Unity assets: dependency inspection, reference integrity checks, prefab/scriptable-object creation, and package add/remove via the `u` CLI.
Applies Unity project coding guidelines before any code change. Reads project-specific rules, modern Unity patterns, event function docs, and API references.