Represents a command to get the camera configuration from Unreal.
This class sends a message to the Metabox API to get the camera from a scene.
To listen for changes after sending this command, listen to the 'getCameraResult' event.
What does it unlock?
Retrieves camera presets for the configurator; allowing extraction and application of saved camera positions.
Practical Application
Requests current camera state — returns asynchronously via the getCameraResult event. Returns a CameraCommandPayload
with fov, mode, position, rotation, and restrictions. Use to save camera positions, create shareable view links,
or build 'save this angle' features.
AI Coding Best Practices
ALWAYS subscribe to getCameraResult BEFORE calling GetCamera(). Pattern: api.addEventListener('getCameraResult', handler);
then api.sendCommandToMetabox(new GetCamera()). The returned CameraCommandPayload can be fed directly back into
SetCamera to restore the view.
//Subscribe to the event before sending the command to ensure you capture the response api.addEventListener('getCameraResult', (data:CameraCommandPayload) => { console.log('Camera params after get camera command:', data); });
Represents a command to get the camera configuration from Unreal. This class sends a message to the Metabox API to get the camera from a scene. To listen for changes after sending this command, listen to the 'getCameraResult' event.
What does it unlock?
Retrieves camera presets for the configurator; allowing extraction and application of saved camera positions.
Practical Application
Requests current camera state — returns asynchronously via the getCameraResult event. Returns a CameraCommandPayload with fov, mode, position, rotation, and restrictions. Use to save camera positions, create shareable view links, or build 'save this angle' features.
AI Coding Best Practices
ALWAYS subscribe to getCameraResult BEFORE calling GetCamera(). Pattern:
api.addEventListener('getCameraResult', handler);thenapi.sendCommandToMetabox(new GetCamera()). The returned CameraCommandPayload can be fed directly back into SetCamera to restore the view.Example