MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / burst

Method burst

unity_cli/api/screenshot.py:70–115  ·  view source on GitHub ↗

Capture multiple frames in rapid succession. Args: count: Number of frames to capture (default: 10, max: 1000) interval_ms: Minimum interval between frames in ms (0 = fastest possible) format: Image format - "png" or "jpg" (default: jpg) quali

(
        self,
        count: int = 10,
        interval_ms: int = 0,
        format: Literal["png", "jpg"] = "jpg",
        quality: int = 75,
        width: int = 1920,
        height: int = 1080,
        camera: str | None = None,
        output_dir: str | None = None,
    )

Source from the content-addressed store, hash-verified

68 return self._conn.send_request("screenshot", params)
69
70 def burst(
71 self,
72 count: int = 10,
73 interval_ms: int = 0,
74 format: Literal["png", "jpg"] = "jpg",
75 quality: int = 75,
76 width: int = 1920,
77 height: int = 1080,
78 camera: str | None = None,
79 output_dir: str | None = None,
80 ) -> dict[str, Any]:
81 """Capture multiple frames in rapid succession.
82
83 Args:
84 count: Number of frames to capture (default: 10, max: 1000)
85 interval_ms: Minimum interval between frames in ms (0 = fastest possible)
86 format: Image format - "png" or "jpg" (default: jpg)
87 quality: JPEG quality 1-100 (default: 75)
88 width: Image width (default: 1920)
89 height: Image height (default: 1080)
90 camera: Camera GameObject name. Uses Main Camera if not specified.
91 output_dir: Output directory. Auto-generated if not specified.
92
93 Returns:
94 Dictionary with burst result including:
95 - frameCount: Number of frames captured
96 - outputDir: Output directory path
97 - format: Image format used
98 - elapsed: Total time in seconds
99 - fps: Achieved frames per second
100 - paths: List of frame file paths
101 """
102 params: dict[str, Any] = {
103 "action": "burst",
104 "count": count,
105 "interval_ms": interval_ms,
106 "format": format,
107 "quality": quality,
108 "width": width,
109 "height": height,
110 }
111 if camera is not None:
112 params["camera"] = camera
113 if output_dir is not None:
114 params["outputDir"] = output_dir
115 return self._conn.send_request("screenshot", params, timeout_ms=120000)

Callers 1

_burstFunction · 0.80

Calls 1

send_requestMethod · 0.80

Tested by

no test coverage detected