Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via
GET /skills/recommend?includeSchema=true
) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.
Triggers
- Framing the Scene View
- Creating or adjusting cameras
- Tweaking FOV or clipping planes
- 取景 Scene View、创建或调整相机、修改 FOV 或裁剪面
Camera Skills
Control the Scene View camera and Game Cameras (creation, transform, properties, screenshot, culling, orthographic toggle).
Operating Mode
- Approval (default): mutating skills (, , , , ,
camera_sceneview_screenshot
, , camera_align_view_to_object
, ) need user grant; grant triggers a single server-side execution that returns the result.
- Auto / Bypass: those skills execute directly.
- Query skills (, , ) are — they run in all three modes without grant.
- This module contains no Delete / PlayMode / Reload / high-risk skills (no NeverInSemi).
Guardrails
DO NOT (common hallucinations):
- / do not exist → use (Scene View) or (Game Camera)
- does not exist → use with parameter
- skills control two different cameras: //
camera_align_view_to_object
control the Scene View camera; // control Game Cameras
- does not exist → use on the camera GameObject
Routing:
- For Cinemachine virtual cameras → use module
- For Game Camera component properties → / (this module)
- For screenshots → three options: (scene module) = the Game View final composite (all cameras + UI; Play mode = live runtime frame); (this module) = a single Game Camera off-screen render;
camera_sceneview_screenshot
(this module) = the editor Scene View (developer viewport, incl. grid/gizmos)
Skills
camera_align_view_to_object
Align Scene View camera to look at an object.
Parameters:
- (string, optional): Target GameObject name.
- (int, optional): Target GameObject instance ID.
- (string, optional): Target GameObject hierarchy path.
Get
the editor Scene View viewport camera's position and rotation — the developer's viewport,
not a Camera component in the scene. It takes no target parameters for exactly that reason. For a Game Camera's state use
(or
to find one); if you just created a camera with
and want to confirm its transform,
will not show it.
Parameters: None.
Set Scene View camera position/rotation manually.
Parameters:
- , , (float): Position.
- , , (float): Rotation (Euler).
- (float, optional): Orthographic size or pivot distance (default 5).
- (bool, optional): Move instantly (default true).
Focus Scene View camera on a world-space point.
Parameters:
- , , (float): Target point.
- Does not support or GameObject lookup. For object focus, use
camera_align_view_to_object
.
Create a new Game Camera.
| Parameter | Type | Required | Default | Description |
|---|
| name | string | No | "New Camera" | Name of the new camera GameObject |
| x | float | No | 0 | Position X |
| y | float | No | 1 | Position Y |
| z | float | No | -10 | Position Z |
| addAudioListener | bool | No | false | Also attach an component |
Returns: { success, name, instanceId }
Get Game Camera properties (supports name/instanceId/path).
| Parameter | Type | Required | Default | Description |
|---|
| name | string | No | null | Name of the camera GameObject |
| instanceId | int | No | 0 | Instance ID of the camera GameObject |
| path | string | No | null | Hierarchy path of the camera GameObject |
Returns: { success, name, fieldOfView, nearClipPlane, farClipPlane, orthographic, orthographicSize, depth, cullingMask, clearFlags, backgroundColor, rect }
Set Game Camera properties (FOV, clip planes, clear flags, background color, depth).
| Parameter | Type | Required | Default | Description |
|---|
| name | string | No | null | Name of the camera GameObject |
| instanceId | int | No | 0 | Instance ID of the camera GameObject |
| path | string | No | null | Hierarchy path of the camera GameObject |
| fieldOfView | float? | No | null | Camera field of view |
| nearClipPlane | float? | No | null | Near clipping plane distance |
| farClipPlane | float? | No | null | Far clipping plane distance |
| depth | float? | No | null | Camera rendering depth |
| clearFlags | string | No | null | Clear flags: , , , , . and are two names for the same underlying value, so both are accepted and the response always echoes it back as — do not read that as the write having been ignored |
| bgR | float? | No | null | Background color red component (0-1) |
| bgG | float? | No | null | Background color green component (0-1) |
| bgB | float? | No | null | Background color blue component (0-1) |
| bgA | float? | No | null | Background color alpha (0-1) |
Any
channel you omit keeps the camera's current value, so you can set alpha alone.
Returns: { success, name, applied, fieldOfView, nearClipPlane, farClipPlane, orthographic, orthographicSize, depth, cullingMask, clearFlags, backgroundColor, rect }
— the response echoes the camera's state
after the write, and
lists which parameters were actually changed, named exactly as you passed them (the background channels appear individually as
,
,
,
, not lumped under
), so a parameter absent from
was not supplied. That echo is your verification: a second
call is redundant. An unparseable
rejects the whole call with
+
before anything is applied, so the numeric parameters in the same call are never half-written.
Set Game Camera culling mask by layer names (comma-separated).
| Parameter | Type | Required | Default | Description |
|---|
| layerNames | string | Yes | - | Comma-separated layer names |
| name | string | No | null | Name of the camera GameObject |
| instanceId | int | No | 0 | Instance ID of the camera GameObject |
| path | string | No | null | Hierarchy path of the camera GameObject |
Capture a screenshot from a Game Camera to file.
| Parameter | Type | Required | Default | Description |
|---|
| savePath | string | No | "Assets/screenshot.png" | File path to save the screenshot |
| width | int | No | 1920 | Screenshot width in pixels |
| height | int | No | 1080 | Screenshot height in pixels |
| name | string | No | null | Name of the camera GameObject |
| instanceId | int | No | 0 | Instance ID of the camera GameObject |
| path | string | No | null | Hierarchy path of the camera GameObject |
| returnImage | bool | No | false | Also return the PNG as base64 in the response (), for clients without filesystem access |
| maxDimension | int | No | 1280 | Only used when ; downscales the returned image (not the saved file) so its longer edge is ≤ this value. Clamped to 256–4096 |
Returns: { success, path, width, height }
, plus
{ imageBase64, imageWidth, imageHeight, imageBytes }
when
. If the base64 payload would exceed 8MB, the skill returns an error asking for a smaller
— the file at
is still saved.
camera_sceneview_screenshot
Capture the
editor Scene View (the developer's editing viewport — can overlook the whole scene incl. off-camera objects). Distinct from
(Game View / player camera) and
(one Game Camera). By default captures the full Scene View incl. grid/gizmos/selection (on-screen read); auto-falls back to a clean offscreen render if the editor build lacks the internal API. The Scene View window must be open and visible for the overlay capture.
| Parameter | Type | Required | Default | Description |
|---|
| filename | string | No | "sceneview.png" | Bare filename only (no path separators); saved under |
| includeOverlays | bool | No | true | True = full Scene View with grid/gizmos/selection (falls back to a clean render if unsupported); false = clean offscreen scene render only |
| returnImage | bool | No | false | Also return the PNG as base64 in the response (), for clients without filesystem access |
| maxDimension | int | No | 1280 | Only used when ; downscales the returned image (not the saved file) so its longer edge is ≤ this value. Clamped to 256–4096 |
Returns: { success, path, width, height, mode, note }
—
is
or
— plus
{ imageBase64, imageWidth, imageHeight, imageBytes }
when
. If the base64 payload would exceed 8MB, the skill returns an error asking for a smaller
— the file at
is still saved.
returnImage usage tip: a local agent that can read files (e.g. Claude Code against a local Unity Editor) should generally omit
and just read the PNG at
— it's cheaper on tokens. Use
for remote/MCP clients that have no filesystem access to the Unity project.
Switch Game Camera between orthographic and perspective mode.
| Parameter | Type | Required | Default | Description |
|---|
| orthographic | bool | Yes | - | True for orthographic, false for perspective |
| orthographicSize | float? | No | null | Orthographic size (only applies in orthographic mode) |
| name | string | No | null | Name of the camera GameObject |
| instanceId | int | No | 0 | Instance ID of the camera GameObject |
| path | string | No | null | Hierarchy path of the camera GameObject |
Returns: { success, orthographic, orthographicSize }
List all cameras in the scene.
| Parameter | Type | Required | Default | Description |
|---|
Returns: { count, cameras: [{ name, instanceId, path, depth, orthographic, enabled }] }
Exact Signatures
Exact names, parameters, defaults, and returns are defined by
or
unity_skills.get_skill_schema()
, not by this file.