name: uloop-capture-window
description: Capture Unity EditorWindow and save as PNG. Use when you need to: (1) Take a screenshot of Game View, Scene View, Console, Inspector, etc., (2) Capture visual state for debugging or verification, (3) Save editor output as an image file.
uloop capture-window
Capture any Unity EditorWindow by name and save as PNG.
Usage
uloop capture-window [--window-name <name>] [--resolution-scale <scale>] [--match-mode <mode>]
Parameters
| Parameter |
Type |
Default |
Description |
--window-name |
string |
Game |
Window name to capture (e.g., "Game", "Scene", "Console", "Inspector", "Project", "Hierarchy", or any EditorWindow title) |
--resolution-scale |
number |
1.0 |
Resolution scale (0.1 to 1.0) |
--match-mode |
enum |
exact |
Window name matching mode: exact, prefix, or contains. All modes are case-insensitive. |
Match Modes
| Mode |
Description |
Example |
exact |
Window name must match exactly (case-insensitive) |
"Project" matches "Project" only |
prefix |
Window name must start with the input |
"Project" matches "Project" and "Project Settings" |
contains |
Window name must contain the input anywhere |
"set" matches "Project Settings" |
Window Name
The window name is the text displayed in the window's title bar (tab). The user (human) will tell you which window to capture. Common window names include:
- Game: Game View window
- Scene: Scene View window
- Console: Console window
- Inspector: Inspector window
- Project: Project browser window
- Hierarchy: Hierarchy window
- Animation: Animation window
- Animator: Animator window
- Profiler: Profiler window
- Audio Mixer: Audio Mixer window
You can also specify custom EditorWindow titles (e.g., "EditorWindow Capture Test").
Examples
# Capture Game View at full resolution
uloop capture-window
# Capture Game View at half resolution
uloop capture-window --window-name Game --resolution-scale 0.5
# Capture Scene View
uloop capture-window --window-name Scene
# Capture Console window
uloop capture-window --window-name Console
# Capture Inspector window
uloop capture-window --window-name Inspector
# Capture Project browser (exact match - won't match "Project Settings")
uloop capture-window --window-name Project
# Capture all windows starting with "Project" (prefix match)
uloop capture-window --window-name Project --match-mode prefix
# Capture custom EditorWindow by title
uloop capture-window --window-name "My Custom Window"
Output
Returns JSON with:
CapturedCount: Number of windows captured
CapturedWindows: Array of captured window info, each containing:
ImagePath: Absolute path to the saved PNG file
FileSizeBytes: Size of the saved file in bytes
Width: Captured image width in pixels
Height: Captured image height in pixels
When multiple windows match (e.g., multiple Inspector windows or when using contains mode), all matching windows are captured with numbered filenames (e.g., Inspector_1_*.png, Inspector_2_*.png).
Notes
- Use
uloop focus-window first if needed
- Target window must be open in Unity Editor
- Window name matching is always case-insensitive
1---2name: capturewindow3description: Capture any Unity EditorWindow by name and save as PNG.4---5
6---
7name: uloop-capture-window
8description: Capture Unity EditorWindow and save as PNG. Use when you need to: (1) Take a screenshot of Game View, Scene View, Console, Inspector, etc., (2) Capture visual state for debugging or verification, (3) Save editor output as an image file.
9---
10
11# uloop capture-window
12
13Capture any Unity EditorWindow by name and save as PNG.
14
15## Usage
16
17```bash
18uloop capture-window [--window-name <name>] [--resolution-scale <scale>] [--match-mode <mode>]
19```
20
21## Parameters
22
23| Parameter | Type | Default | Description |
24|-----------|------|---------|-------------|
25| `--window-name` | string | `Game` | Window name to capture (e.g., "Game", "Scene", "Console", "Inspector", "Project", "Hierarchy", or any EditorWindow title) |
26| `--resolution-scale` | number | `1.0` | Resolution scale (0.1 to 1.0) |
27| `--match-mode` | enum | `exact` | Window name matching mode: `exact`, `prefix`, or `contains`. All modes are case-insensitive. |
28
29## Match Modes
30
31| Mode | Description | Example |
32|------|-------------|---------|
33| `exact` | Window name must match exactly (case-insensitive) | "Project" matches "Project" only |
34| `prefix` | Window name must start with the input | "Project" matches "Project" and "Project Settings" |
35| `contains` | Window name must contain the input anywhere | "set" matches "Project Settings" |
36
37## Window Name
38
39The window name is the text displayed in the window's title bar (tab). The user (human) will tell you which window to capture. Common window names include:
40
41- **Game**: Game View window
42- **Scene**: Scene View window
43- **Console**: Console window
44- **Inspector**: Inspector window
45- **Project**: Project browser window
46- **Hierarchy**: Hierarchy window
47- **Animation**: Animation window
48- **Animator**: Animator window
49- **Profiler**: Profiler window
50- **Audio Mixer**: Audio Mixer window
51
52You can also specify custom EditorWindow titles (e.g., "EditorWindow Capture Test").
53
54## Examples
55
56```bash
57# Capture Game View at full resolution
58uloop capture-window
59
60# Capture Game View at half resolution
61uloop capture-window --window-name Game --resolution-scale 0.5
62
63# Capture Scene View
64uloop capture-window --window-name Scene
65
66# Capture Console window
67uloop capture-window --window-name Console
68
69# Capture Inspector window
70uloop capture-window --window-name Inspector
71
72# Capture Project browser (exact match - won't match "Project Settings")
73uloop capture-window --window-name Project
74
75# Capture all windows starting with "Project" (prefix match)
76uloop capture-window --window-name Project --match-mode prefix
77
78# Capture custom EditorWindow by title
79uloop capture-window --window-name "My Custom Window"
80```
81
82## Output
83
84Returns JSON with:
85- `CapturedCount`: Number of windows captured
86- `CapturedWindows`: Array of captured window info, each containing:
87 - `ImagePath`: Absolute path to the saved PNG file
88 - `FileSizeBytes`: Size of the saved file in bytes
89 - `Width`: Captured image width in pixels
90 - `Height`: Captured image height in pixels
91
92When multiple windows match (e.g., multiple Inspector windows or when using `contains` mode), all matching windows are captured with numbered filenames (e.g., `Inspector_1_*.png`, `Inspector_2_*.png`).
93
94## Notes
95
96- Use `uloop focus-window` first if needed
97- Target window must be open in Unity Editor
98- Window name matching is always case-insensitive