To listen for changes after sending this command, listen to the 'screenshot' event before command is sent.
What does it unlock?
Takes a screenshot on the server side (Unreal Engine) of the 3D scene. Returns high-quality image.
Requires subscription to the screenshotReady event to receive the rendered image.
Practical Application
Renders a high-res screenshot on the Unreal Engine server. Takes format ('image/png'|'image/jpeg'|'image/webp')
and optional size ({x, y}). Returns base64 data via screenshotReady event. Use for thumbnails, social sharing,
saving config snapshots, or attaching images to quotes.
AI Coding Best Practices
Subscribe to screenshotReady BEFORE sending GetScreenshot. Pattern:
api.addEventListener('screenshotReady', (data) => { if(data) saveImage(data, 'name.png'); }).
Specify size for consistent outputs: new GetScreenshot('image/png', {x:2048, y:2048}).
Use saveImage() helper to convert base64 to downloadable file.
//Subscribe to the event before sending the command to ensure you capture the response api.addEventListener('screenshot', (data:string) => { // The data is a base64 string of the image. You can use it to display the image or save it as a file. console.log('Get screenshot here:', data); saveImage(data, 'Render.png'); });
Represents a command to get a screenshot.
To listen for changes after sending this command, listen to the 'screenshot' event before command is sent.
What does it unlock?
Takes a screenshot on the server side (Unreal Engine) of the 3D scene. Returns high-quality image. Requires subscription to the screenshotReady event to receive the rendered image.
Practical Application
Renders a high-res screenshot on the Unreal Engine server. Takes format ('image/png'|'image/jpeg'|'image/webp') and optional size ({x, y}). Returns base64 data via screenshotReady event. Use for thumbnails, social sharing, saving config snapshots, or attaching images to quotes.
AI Coding Best Practices
Subscribe to screenshotReady BEFORE sending GetScreenshot. Pattern:
api.addEventListener('screenshotReady', (data) => { if(data) saveImage(data, 'name.png'); }). Specify size for consistent outputs:new GetScreenshot('image/png', {x:2048, y:2048}). Use saveImage() helper to convert base64 to downloadable file.Example
Param: mimeType
The output format.
Param: size
Optional size in pixels.