Skip to main content

capture_camera

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: camera  ·  Module: services.registry.capability_adapter

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

Capture Game or Scene views, including surround and orbit batches.

Parameters​

NameTypeRequiredDescription
actionLiteral['screenshot', 'screenshot_multiview']yesFeature action to perform.
screenshot_file_namestr | None—Screenshot file name (optional). Defaults to timestamp.
screenshot_super_sizeint | str | None—Screenshot supersize multiplier (integer 1 to 4).
camerastr | None—Camera to capture from (name, path, or instance ID). Omit for default Game View capture, which can fall back to an existing camera. Camera renders omit Screen Space - Overlay canvases and UI Toolkit panels.
include_imagebool | str | None—If true, return screenshot as inline base64 PNG. Default false.
max_resolutionint | str | None—Max resolution (longest edge px) for inline image, 1 to 8192. Default 640. The Editor also enforces frame and aggregate pixel budgets.
capture_sourceLiteral['game_view', 'scene_view'] | None—Screenshot source. 'game_view' (default) captures the game/camera path; 'scene_view' captures the active Unity Scene View viewport.
batchstr | None—Batch capture mode: 'surround' (6 angles) or 'orbit' (configurable grid).
view_targetstr | int | list[float] | None—Target to focus on. GameObject name/path/ID or [x,y,z]. For game_view: aims camera at target. For scene_view: frames the Scene View on the target.
view_positionlist[float] | str | None—World position [x,y,z] to place camera for positioned capture.
view_rotationlist[float] | str | None—Euler rotation [x,y,z] for camera. Overrides view_target if both provided.
orbit_anglesint | str | None—Number of azimuth samples for batch='orbit' (default 8, max 36).
orbit_elevationslist[float] | str | None—Elevation angles in degrees for batch='orbit' (default [0, 30, -15]). 1 to 16 finite angles; at most 128 total orbit shots.
orbit_distancefloat | str | None—Camera distance from target for batch='orbit' (default auto).
orbit_fovfloat | str | None—Camera FOV in degrees for batch='orbit' (default 60).
output_folderstr | None—Optional folder for screenshot output. Project-relative (e.g. 'Assets/Screenshots' or 'Captures') or absolute path inside the project. Overrides the user's Editor preference. If omitted, falls back to the Editor preference, then to the built-in default (Assets/Screenshots).
timeout_secondsint—Scene View repaint wait budget in seconds; returns as soon as a matching frame finishes.
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

Capture the current Game view in a connected graphical Editor. Request a smaller inline image for visual comparison and let Unity choose the generated screenshot filename.

MCP arguments
{
"action": "screenshot",
"include_image": true,
"max_resolution": 640
}