コンテンツにスキップ

capture_screenshot

Capture a PNG from the Game View or Scene View and return it as an image content block, plus a text summary. view=game re-renders a single camera (Camera.main, else the first camera found) into an offscreen texture: Screen Space - Overlay canvases, UI Toolkit panels, and other cameras’ output are not included, so it is not a copy of what the Game View window shows.

分類: 診断

名前 型 必須 既定値 説明
view string "game" Which view to capture. 値: game, scene
width integer 0 Screenshot width (0 = use current)
height integer 0 Screenshot height (0 = use current)
supersampling integer 1 Supersampling factor for higher quality (1-4)
save_to_file string Optional file path to save the screenshot (relative to project or absolute)
camera_position object Scene View pivot point the camera orbits and looks at (only for scene view)
camera_rotation object Scene View camera rotation in euler angles (only for scene view)
camera_size number Scene View orthographic size / perspective distance (only for scene view)

必須の引数だけを入れています。ほかは必要に応じて足してください。

{
"name": "capture_screenshot",
"arguments": {}
}

Unity を NANORA_MCP_SUPERSAVE=1 で起動したときは、メタツール execute から {"tool": "capture_screenshot", "args": { … }} の形で呼びます。SuperSave モードを参照。

Assets/NanoraUnityMCP/Editor/Tools/CaptureScreenshotTool.cs(版 1.2.1)から生成しています。説明文はツール定義のまま(英語)です。AI クライアントは tools/list で同じスキーマを受け取ります。