unity-cli
Use this skill when the user wants to control Unity Editor from the command line, run C# code in Unity, or automate Unity workflows.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 57
- Forks
- 5
01 前言 Front Matter
- name
- unity-cli
- description
- Use this skill when the user wants to control Unity Editor from the command line, run C# code in Unity, or automate Unity workflows.
03 SKILL.md 正文
Unity CLI Plugin
Control Unity Editor from the command line. Built for AI agents, works with anything.
Commands
unity-cli <resource> <action>— Execute unity-cli commandsunity-cli self version— Print unity-cli versionunity-cli editor status— Show Unity Editor connection stateunity-cli editor play— Enter Unity Editor play modeunity-cli editor stop— Stop Unity Editor play modeunity-cli editor pause— Toggle pause in Unity Editor play modeunity-cli console read— Read Unity Editor console logsunity-cli exec code— Execute C# code inside Unity Editorunity-cli menu execute— Execute Unity menu item by pathunity-cli reserialize assets— Re-serialize Unity assets through Unity's serializerunity-cli profiler hierarchy— Read Unity profiler hierarchyunity-cli test run— Run Unity EditMode/PlayMode testsunity-cli screenshot capture— Capture Unity scene/game view as PNGunity-cli list tools— Show all available Unity CLI tools with parameter schemasunity-cli _ _— Passthrough to unity-cli CLI
What is unity-cli?
unity-cli is a single binary that talks directly to Unity via HTTP. No server to run, no config to write, no process to manage. Just type a command.
Quick Start
# Check Unity connection
sc unity-cli editor status
# Enter play mode and wait
sc unity-cli editor play --wait
# Run C# code inside Unity
sc unity-cli exec code --code "return Application.dataPath;"
# Read console logs
sc unity-cli console read --type error
Key Commands
Editor Control
sc unity-cli editor play- Enter play modesc unity-cli editor play --wait- Enter play mode and wait for completionsc unity-cli editor stop- Stop play modesc unity-cli editor pause- Toggle pause
Console Logs
sc unity-cli console read- Read error and warning logssc unity-cli console read --lines 20 --filter error,warning,log- Read last 20 log entriessc unity-cli console read --type error- Read only errorssc unity-cli console read --stacktrace user- Include stack traces
Execute C# Code
sc unity-cli exec code --code "return Application.dataPath;"- Run C# codesc unity-cli exec code --code "return World.All.Count;" --usings Unity.Entities- With custom namespaces
Menu Items
sc unity-cli menu execute --path "File/Save Project"- Execute menu item by path
Asset Reserialize
sc unity-cli reserialize assets- Reserialize entire projectsc unity-cli reserialize assets --assets Assets/Prefabs/Player.prefab- Reserialize specific asset
Profiler
sc unity-cli profiler hierarchy- Read profiler hierarchysc unity-cli profiler hierarchy --depth 3- Recursive drill-down
Unity Setup
Add the Unity Connector package via Package Manager → Add package from git URL:
https://github.com/youngwoocho02/unity-cli.git?path=unity-connector
Installation
curl -fsSL https://raw.githubusercontent.com/youngwoocho02/unity-cli/master/install.sh | sh
Use Cases
- Automate Unity Editor workflows from scripts
- Run C# code snippets without opening Unity
- Batch process Unity assets
- Integrate Unity into CI/CD pipelines
- Control Unity from AI agents
04 同仓库更多 Skills
sc-machin-mcp
暂无简介
supercli.quickstart
SuperCLI capability router — discover and execute CLI commands through namespace.resource.action interface
zzdoc
Use this skill to compile scdoc manpages with a fast Zig-based compiler.
zx
Use this skill when the user wants to a tool for writing better scripts using node.js.
zvm
Use this skill when the user wants to manage multiple Zig compiler versions.
quickstart
暂无简介