Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 15 additions & 7 deletions .claude/skills/unity-mcp-skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,36 @@ manage_camera(action="screenshot", camera="MainCamera", include_image=True, max_
manage_camera(action="screenshot", batch="surround", max_resolution=256)

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

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

# Scene View screenshot: capture what the developer sees in the editor
manage_camera(action="screenshot", capture_source="scene_view", include_image=True)

# Scene View framed on a specific object
manage_camera(action="screenshot", capture_source="scene_view", view_target="Canvas", include_image=True)
```

**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.
- Use `view_target`/`view_position` to capture from a specific viewpoint without needing a scene camera.
- Use `capture_source="scene_view"` to see the editor viewport (gizmos, wireframes, grid).
- 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_camera(action="screenshot", camera="MainCamera", include_image=True, max_resolution=512)
# → Analyze image, decide next action

# Screenshot from a different camera
manage_camera(action="screenshot", camera="FollowCam", include_image=True, max_resolution=512)
manage_camera(action="screenshot_multiview", max_resolution=480) # 6-angle contact sheet
# Multi-view screenshot (6-angle contact sheet)
manage_camera(action="screenshot_multiview", max_resolution=480)

# Scene View for editor-level inspection (shows gizmos, debug overlays, etc.)
manage_camera(action="screenshot", capture_source="scene_view", view_target="Player", include_image=True)
```

### 4. Check Console After Major Changes
Expand Down
29 changes: 18 additions & 11 deletions .claude/skills/unity-mcp-skill/references/tools-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ manage_scene(
manage_scene(
action="screenshot",
batch="surround",
look_at="Player", # str|int|list[float] - center surround on this target
view_target="Player", # str|int|list[float] - center surround on this target
max_resolution=256
)

# Batch orbit — configurable multi-angle grid around a target
manage_scene(
action="screenshot",
batch="orbit", # str - "orbit" for configurable angle grid
look_at="Player", # str|int|list[float] - target to orbit around
view_target="Player", # str|int|list[float] - target to orbit around
orbit_angles=8, # int, default 8 - number of azimuth steps
orbit_elevations=[0, 30], # list[float], default [0, 30, -15] - vertical angles in degrees
orbit_distance=10, # float, optional - camera distance (auto-fit if omitted)
Expand All @@ -156,9 +156,9 @@ manage_scene(
# 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_target="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)
view_rotation=[45, 0, 0], # list[float], optional - euler angles (overrides view_target aim)
max_resolution=512
)

Expand Down Expand Up @@ -836,13 +836,14 @@ Unified camera management (Unity Camera + Cinemachine). Works without Cinemachin

| Parameter | Type | Description |
|-----------|------|-------------|
| `camera` | string | Camera to capture from (defaults to Camera.main) |
| `capture_source` | string | `"game_view"` (default) or `"scene_view"` (editor viewport) |
| `view_target` | string\|int\|list | Target to focus on (GO name/path/ID or [x,y,z]). game_view: aims camera; scene_view: frames viewport |
| `camera` | string | Camera to capture from (defaults to Camera.main). game_view only |
| `include_image` | bool | Return base64 PNG inline (default false) |
| `max_resolution` | int | Downscale cap in px (default 640) |
| `batch` | string | `"surround"` (6 angles) or `"orbit"` (configurable grid) |
| `look_at` | string\|int\|list | Target to aim at (GO name/path/ID or [x,y,z]) |
| `view_position` | list[float] | World position [x,y,z] to place camera |
| `view_rotation` | list[float] | Euler rotation [x,y,z] (overrides look_at) |
| `batch` | string | `"surround"` (6 angles) or `"orbit"` (configurable grid). game_view only |
| `view_position` | list[float] | World position [x,y,z] to place camera. game_view only |
| `view_rotation` | list[float] | Euler rotation [x,y,z] (overrides view_target). game_view only |

**Actions by category:**

Expand Down Expand Up @@ -873,7 +874,7 @@ Unified camera management (Unity Camera + Cinemachine). Works without Cinemachin
- `release_override` — Release camera override

**Capture:**
- `screenshot` — Capture from a camera. Supports inline base64, batch surround/orbit, positioned capture.
- `screenshot` — Capture screenshot. Supports `capture_source="game_view"` (default, camera-based) or `"scene_view"` (editor viewport). game_view supports inline base64, batch surround/orbit, positioned capture. scene_view supports `view_target` for framing.
- `screenshot_multiview` — Shorthand for screenshot with batch='surround' and include_image=true.

**Examples:**
Expand Down Expand Up @@ -924,9 +925,15 @@ manage_camera(action="add_extension", target="FollowCam", properties={
"extensionType": "CinemachineDeoccluder"
})

# Screenshot from a specific camera
# Screenshot from a specific camera (game_view, default)
manage_camera(action="screenshot", camera="FollowCam", include_image=True, max_resolution=512)

# Scene View screenshot (captures editor viewport — gizmos, wireframes, grid)
manage_camera(action="screenshot", capture_source="scene_view", include_image=True)

# Scene View screenshot framed on a specific object
manage_camera(action="screenshot", capture_source="scene_view", view_target="Canvas", include_image=True)

# Multi-view screenshot (6-angle contact sheet)
manage_camera(action="screenshot_multiview", max_resolution=480)

Expand Down
20 changes: 20 additions & 0 deletions .claude/skills/unity-mcp-skill/references/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,26 @@ manage_camera(action="list_cameras")
manage_camera(action="screenshot_multiview", max_resolution=480)
```

### Scene View Screenshot Workflow

Use `capture_source="scene_view"` to capture the editor's Scene View viewport — useful for seeing gizmos, wireframes, grid, debug overlays, and objects without cameras.

```python
# 1. Capture the Scene View as-is
manage_camera(action="screenshot", capture_source="scene_view", include_image=True)

# 2. Frame on a specific object first, then capture
manage_camera(action="screenshot", capture_source="scene_view",
view_target="Player", include_image=True, max_resolution=512)

# 3. Frame on UI Canvas (RectTransform bounds are supported)
manage_camera(action="screenshot", capture_source="scene_view",
view_target="Canvas", include_image=True)

# Limitations: scene_view does not support batch, view_position, view_rotation, or camera selection.
# Use capture_source="game_view" (default) for those features.
```

---

## ProBuilder Workflows
Expand Down
Loading