Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f7c83e7
Animation First PR
Scriptwonder Feb 8, 2026
7fbffc4
Update ClipPresets to take account of local offset
Scriptwonder Feb 8, 2026
ba54607
Update MCPForUnity/Editor/Tools/Animation/ClipCreate.cs
Scriptwonder Feb 8, 2026
2791161
Update for AI fix
Scriptwonder Feb 8, 2026
b9cb25a
Merge branch 'animation' of https://github.com/Scriptwonder/unity-mcp…
Scriptwonder Feb 8, 2026
b1b27b1
Temp Update
Scriptwonder Feb 10, 2026
3e20a44
Merge branch 'CoplayDev:beta' into planner-executer
Scriptwonder Feb 10, 2026
5282bbc
Merge branch 'CoplayDev:beta' into planner-executer
Scriptwonder Feb 10, 2026
f900ce7
update
Scriptwonder Feb 12, 2026
64e54b0
Merge remote-tracking branch 'upstream/beta' into planner-executer
Scriptwonder Feb 12, 2026
b670846
update
Scriptwonder Feb 12, 2026
aa04eff
Merge branch 'CoplayDev:beta' into planner-executer
Scriptwonder Feb 15, 2026
543361f
update
Scriptwonder Feb 15, 2026
2b02428
Merge branch 'planner-executer' of https://github.com/Scriptwonder/un…
Scriptwonder Feb 15, 2026
87239f3
Merge branch 'CoplayDev:beta' into planner-executer
Scriptwonder Feb 18, 2026
328c7d9
Initial update
Scriptwonder Feb 24, 2026
297d725
Delete 2026-02-09-implement-the-following-plan.txt
Scriptwonder Feb 24, 2026
e57cc3a
update
Scriptwonder Feb 24, 2026
0812365
Remove scene generator, 3D gen, and unrelated files from PR
Scriptwonder Feb 24, 2026
4ff3a59
Remove ObjectTransformHistory from PR
Scriptwonder Feb 24, 2026
4605948
Update pyproject.toml
Scriptwonder Feb 24, 2026
eced78c
Merge branch 'beta' into update-on-skill/ui/camera
Scriptwonder Feb 24, 2026
67883c8
Update MCPForUnity/Editor/Tools/GameObjects/GameObjectLookAt.cs
Scriptwonder Feb 24, 2026
4cfc198
Update Server/src/services/tools/manage_scene.py
Scriptwonder Feb 24, 2026
e5e2a6c
update based on ai feedback
Scriptwonder Feb 24, 2026
1980f53
Merge branch 'update-on-skill/ui/camera' of https://github.com/Script…
Scriptwonder Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions .claude/skills/unity-mcp-skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,40 @@ batch_execute(

**Max 25 commands per batch by default (configurable in Unity MCP Tools window, max 100).** Use `fail_fast=True` for dependent operations.

### 3. Use `screenshot` in manage_scene to Verify Visual Results
### 3. Use Screenshots to Verify Visual Results

```python
# Via manage_scene
manage_scene(action="screenshot") # Returns base64 image
# Basic screenshot (saves to Assets/, returns file path only)
manage_scene(action="screenshot")

# After creating/modifying objects, verify visually:
# 1. Create objects
# 2. capture screenshot
# 3. Analyze if result matches intent
# Inline screenshot (returns base64 PNG directly to the AI)
manage_scene(action="screenshot", include_image=True)

# Use a specific camera and cap resolution for smaller payloads
manage_scene(action="screenshot", camera="MainCamera", include_image=True, max_resolution=512)

# Batch surround: captures front/back/left/right/top/bird_eye around the scene
manage_scene(action="screenshot", batch="surround", max_resolution=256)

# Batch surround centered on a specific object
manage_scene(action="screenshot", batch="surround", look_at="Player", max_resolution=256)

# Positioned screenshot: place a temp camera and capture in one call
manage_scene(action="screenshot", look_at="Player", view_position=[0, 10, -10], max_resolution=512)
```

**Best practices for AI scene understanding:**
- Use `include_image=True` when you need to *see* the scene, not just save a file.
- Use `batch="surround"` for a comprehensive overview (6 angles, one command).
- Use `look_at`/`view_position` to capture from a specific viewpoint without needing a scene camera.
- Keep `max_resolution` at 256–512 to balance quality vs. token cost.
- Combine with `look_at` on `manage_gameobject` to orient a game camera before capturing.

```python
# Agentic camera loop: point, shoot, analyze
manage_gameobject(action="look_at", target="MainCamera", look_at_target="Player")
manage_scene(action="screenshot", camera="MainCamera", include_image=True, max_resolution=512)
# → Analyze image, decide next action
```

### 4. Check Console After Major Changes
Expand Down Expand Up @@ -134,7 +158,7 @@ uri="file:///full/path/to/file.cs"
| **Editor** | `manage_editor`, `execute_menu_item`, `read_console` | Editor control |
| **Testing** | `run_tests`, `get_test_job` | Unity Test Framework |
| **Batch** | `batch_execute` | Parallel/bulk operations |
| **UI** | `batch_execute` with `manage_gameobject` + `manage_components` | Canvas, Panel, Button, Text, Slider, Toggle, Input Field (see [UI workflows](references/workflows.md#ui-creation-workflows)) |
| **UI** | `batch_execute` with `manage_gameobject` + `manage_components` | Canvas, Panel, Button, Text, Slider, Toggle, Input Field. **Read `mcpforunity://project/info` first** to detect uGUI/TMP/Input System availability. (see [UI workflows](references/workflows.md#ui-creation-workflows)) |

## Common Workflows

Expand Down
104 changes: 100 additions & 4 deletions .claude/skills/unity-mcp-skill/references/tools-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@ Complete reference for all MCP tools. Each tool includes parameters, types, and

---

## Project Info Resource

Read `mcpforunity://project/info` to detect project capabilities before making assumptions about UI, input, or rendering setup.

**Returned fields:**

| Field | Type | Description |
|-------|------|-------------|
| `projectRoot` | string | Absolute path to project root |
| `projectName` | string | Project folder name |
| `unityVersion` | string | e.g. `"2022.3.20f1"` |
| `platform` | string | Active build target e.g. `"StandaloneWindows64"` |
| `assetsPath` | string | Absolute path to Assets folder |
| `renderPipeline` | string | `"BuiltIn"`, `"Universal"`, `"HighDefinition"`, or `"Custom"` |
| `activeInputHandler` | string | `"Old"`, `"New"`, or `"Both"` |
| `packages.ugui` | bool | `com.unity.ugui` installed (Canvas, Image, Button, etc.) |
| `packages.textmeshpro` | bool | `com.unity.textmeshpro` installed (TMP_Text, TMP_InputField) |
| `packages.inputsystem` | bool | `com.unity.inputsystem` installed (InputAction, PlayerInput) |

**Key decision points:**

- **UI system**: If `packages.ugui` is true, use Canvas + uGUI components. UI Toolkit (UIDocument/UXML) is built-in since Unity 2021+ but has no MCP tool support yet.
- **Text**: If `packages.textmeshpro` is true, use `TextMeshProUGUI` instead of legacy `Text`.
- **Input**: Use `activeInputHandler` to decide EventSystem module — `StandaloneInputModule` (Old) vs `InputSystemUIInputModule` (New). See [workflows.md — Input System](workflows.md#input-system-old-vs-new).
- **Shaders**: Use `renderPipeline` to pick correct shader names — `Standard` (BuiltIn) vs `Universal Render Pipeline/Lit` (URP) vs `HDRP/Lit` (HDRP).

---

## Infrastructure Tools

### batch_execute
Expand Down Expand Up @@ -66,7 +94,7 @@ refresh_unity(

### manage_scene

Scene CRUD operations and hierarchy queries.
Scene CRUD operations, hierarchy queries, screenshots, and scene view control.

```python
# Get hierarchy (paginated)
Expand All @@ -78,8 +106,47 @@ manage_scene(
include_transform=False # bool - include local transforms
)

# Screenshot
manage_scene(action="screenshot") # Returns base64 PNG
# Screenshot (file only — saves to Assets/)
manage_scene(action="screenshot")

# Screenshot with inline image (base64 PNG returned to AI)
manage_scene(
action="screenshot",
camera="MainCamera", # str, optional - camera name, path, or instance ID
include_image=True, # bool, default False - return base64 PNG inline
max_resolution=512 # int, optional - downscale cap (default 640)
)

# Batch surround (6 angles around scene bounds, no file saved)
manage_scene(
action="screenshot",
batch="surround", # str - "surround" for 6-angle capture
max_resolution=256 # int - keep low for batch (6 images)
)
# Returns: front, back, left, right, top, bird_eye views

# Batch surround centered on a specific target
manage_scene(
action="screenshot",
batch="surround",
look_at="Player", # str|int|list[float] - center surround on this target
max_resolution=256
)

# Positioned screenshot (temp camera at viewpoint, no file saved)
manage_scene(
action="screenshot",
look_at="Enemy", # str|int|list[float] - target to aim at
view_position=[0, 10, -10], # list[float], optional - camera position
view_rotation=[45, 0, 0], # list[float], optional - euler angles (overrides look_at aim)
max_resolution=512
)

# Frame scene view on target
manage_scene(
action="scene_view_frame",
scene_view_target="Player" # str|int - GO name, path, or instance ID to frame
)

# Other actions
manage_scene(action="get_active") # Current scene info
Expand Down Expand Up @@ -166,6 +233,14 @@ manage_gameobject(
distance=5.0,
world_space=True
)

# Look at target (rotates GO to face a point or another GO)
manage_gameobject(
action="look_at",
target="MainCamera", # the GO to rotate
look_at_target="Player", # str (GO name/path) or list[float] world position
look_at_up=[0, 1, 0] # optional up vector, default [0,1,0]
)
```

### manage_components
Expand Down Expand Up @@ -207,6 +282,24 @@ manage_components(
"localScale": [2, 2, 2]
}
)

# Set object reference property (reference another GameObject by name)
manage_components(
action="set_property",
target="GameManager",
component_type="GameManagerScript",
property="targetObjects",
value=[{"name": "Flower_1"}, {"name": "Flower_2"}, {"name": "Bee_1"}]
)

# Object reference formats supported:
# - {"name": "ObjectName"} → Find GameObject in scene by name
# - {"instanceID": 12345} → Direct instance ID reference
# - {"guid": "abc123..."} → Asset GUID reference
# - {"path": "Assets/..."} → Asset path reference
# - "Assets/Prefabs/My.prefab" → String shorthand for asset paths
# - "ObjectName" → String shorthand for scene name lookup
# - 12345 → Integer shorthand for instanceID
```

---
Expand Down Expand Up @@ -449,7 +542,10 @@ manage_material(
action="set_renderer_color",
target="MyCube",
color=[1, 0, 0, 1],
mode="instance" # "shared"|"instance"|"property_block"
mode="create_unique" # Creates a unique .mat asset per object (persistent)
# Other modes: "property_block" (default, not persistent),
# "shared" (mutates shared material — avoid for primitives),
# "instance" (runtime only, not persistent)
)
```

Expand Down
Loading