Comprehensive Unity Editor operations using unity-mcp-client CLI via uvx. Covers daily workflows (refresh, console, build verification), asset management, scene/object manipulation, and debugging. This skill should be used when users request Unity Editor operations, error analysis, log review, asset refresh, test execution, or after making script/asset modifications.
/plugin marketplace add bigdra50/claude-plugins/plugin install unity-dev@bigdra50This skill inherits all available tools. When active, it can use any tool Claude has access to.
references/error-patterns.mdreferences/mcp-commands.mdStreamline Unity Editor operations through unity-mcp-client CLI via uvx. Handle daily development workflows, asset management, debugging, and scene operations with automated verification cycles.
All Unity Editor operations use unity-mcp-client via uvx:
# Base command (port auto-detected on macOS)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp <command>
# With explicit port
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp --port 6400 <command>
Note: On macOS, port is auto-detected from Unity EditorPrefs. Manual --port is only needed for non-standard setups.
| Command | Purpose | Options |
|---|---|---|
verify | Full validation (refresh→clear→wait→console) | --timeout, --retry, --types |
refresh | Refresh asset database | None |
state | Get editor state (isCompiling, isPlaying) | None |
console | Get console logs | --types, --count |
clear | Clear console | None |
play | Enter Play Mode | None |
stop | Exit Play Mode | None |
find | Find GameObject | <name> |
tests | Run tests | <mode> (edit/play) |
scene | Scene operations | <action> (see below) |
gameobject | GameObject operations | <action> (see below) |
material | Material operations | <action> (see below) |
| Option | Description | Default |
|---|---|---|
--port | MCP server port | Auto-detect (macOS) |
--host | MCP server host | localhost |
--types | Log types (error, warning, log) | error warning |
--count | Number of logs to retrieve | 20 |
--timeout | Max wait for compilation (verify only) | 60s |
--retry | Max connection retry attempts (verify only) | 3 |
--name | Scene name (scene create/load) | None |
--path | Scene path (scene create/load/save) | None |
--build-index | Build index (scene load) | None |
| Action | Purpose | Required Options |
|---|---|---|
active | Get active scene info | None |
hierarchy | Get scene hierarchy tree | None |
build-settings | Get scenes in build settings | None |
load | Load scene | --name, --path, or --build-index |
save | Save current scene | --name, --path (optional) |
create | Create new scene | --name (required), --path (optional) |
| Action | Purpose | Required Options |
|---|---|---|
find | Find GameObject by name | <name> argument |
create | Create new GameObject | --name (required) |
delete | Delete GameObject | --name (required) |
modify | Modify GameObject transform | --name (required) |
GameObject Options:
--name: Object name--primitive: Cube, Sphere, Capsule, Cylinder, Plane, Quad--position: x,y,z format (e.g., 0,1,0)--rotation: x,y,z format--scale: x,y,z format--parent: Parent object name| Action | Purpose | Required Options |
|---|---|---|
create | Create material | --path (required) |
info | Get material info | --path (required) |
set-color | Set material color | --path, --color |
set-property | Set shader property | --path, --property, --value |
assign | Assign to renderer | --path, --target |
set-renderer-color | Set renderer color | --target, --color |
Material Options:
--path: Material asset path (e.g., Assets/Materials/New.mat)--shader: Shader name (default: Standard)--color: r,g,b,a format (e.g., 1,0,0,1)--property: Shader property name (e.g., _BaseColor)--value: Property value--target: Target GameObject name--slot: Material slot index--mode: shared, instance, or property_blockRefer to references/mcp-commands.md for detailed documentation.
Trigger: After editing C# scripts, shaders, or .asmdef files
Workflow:
Edit Script → Refresh Assets → Wait for Compile → Check Console → Fix if Errors
↑ |
└──────────────────── Repeat ←────────────────────────────────┘
Single Command:
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify
This command executes:
isCompiling)With Custom Options:
# Extended timeout for large projects
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify --timeout 120
# Include all log types
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify --types error warning log
# More retry attempts for unstable connections
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify --retry 5
Critical: Never skip verification after script changes. Always verify before reporting task completion.
Trigger: User requests "check logs", "analyze errors", or debugging assistance
Log Types:
error - Compilation and runtime errors (critical)warning - Deprecation, performance warnings (medium)log - Debug.Log output (informational)Commands:
# Get errors only
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp console --types error
# Get errors and warnings (default)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp console
# Get all logs with limit
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp console --types error warning log --count 50
Workflow:
CS0246 at Scripts/Player.cs:15)references/error-patterns.md for known patternsTrigger: User requests test run, or before commit/PR
Prerequisites:
verify first)Commands:
# Run Edit Mode tests
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp tests edit
# Run Play Mode tests
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp tests play
Workflow:
verify first to ensure clean compilationTrigger: User mentions prefabs, ScriptableObjects, or asset operations
Commands:
# Full verification (recommended)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify
# Refresh only (without waiting)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp refresh
Best Practices:
verify after external file changesTrigger: User requests scene management or object manipulation
Scene Operations:
# Get active scene info
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene active
# Get scene hierarchy
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene hierarchy
# Get build settings (scenes in build)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene build-settings
# Load scene by name
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene load --name MainScene
# Load scene by path
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene load --path Assets/Scenes/Level1.unity
# Load scene by build index
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene load --build-index 0
# Save current scene
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene save
# Create new scene
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp scene create --name NewScene --path Assets/Scenes
GameObject Operations:
# Find GameObject
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp gameobject find "Main Camera"
# Create primitive GameObject
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp gameobject create --name "MyCube" --primitive Cube --position 0,1,0
# Modify transform
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp gameobject modify --name "MyCube" --position 5,0,0 --rotation 0,45,0
# Delete GameObject
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp gameobject delete --name "MyCube"
Material Operations:
# Get material info
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp material info --path Assets/Materials/Default.mat
# Create new material
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp material create --path Assets/Materials/New.mat --shader Standard
# Set material color
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp material set-color --path Assets/Materials/New.mat --color 1,0,0,1
# Assign material to object
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp material assign --path Assets/Materials/New.mat --target "MyCube"
Play Mode Control:
# Enter Play Mode
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp play
# Exit Play Mode
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp stop
Editor State:
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp state
| Error Type | Identification | Priority |
|---|---|---|
| Compilation (CS####) | CS error codes | Critical - fix immediately |
| Assembly Reference | Missing .asmdef refs | Critical |
| Runtime Exception | NullReference, Missing | High - fix when requested |
| Deprecation Warning | Obsolete API usage | Medium |
| Performance Warning | GC allocation, etc. | Low |
verify command to confirm resolutionThe state command returns JSON:
{
"success": true,
"data": {
"isPlaying": false,
"isPaused": false,
"isCompiling": false,
"activeSceneName": "MainGame"
}
}
verify after making changesScripts/Player.cs:42)verify before running testsIf CLI commands fail:
--retry option for transient failures--port if auto-detection failsIf compilation takes too long:
--timeout 120If auto-detection fails:
--port 6400Use this skill when:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.