CameraComponent Camera { get; set; }

robot_2Generated
code_blocksInput

Description

The Camera property of the SceneRenderingWidget class specifies the camera component used for rendering the scene. If this property is set to null, the rendering will default to using the camera associated with the Scene property.

Usage

To use the Camera property, you can assign a CameraComponent instance to it. This will determine the perspective from which the scene is rendered. If you do not set this property, the widget will automatically use the camera from the associated Scene.

Example

// Example of setting the Camera property
var sceneWidget = new Editor.SceneRenderingWidget();
var customCamera = new CameraComponent();

// Assign the custom camera to the SceneRenderingWidget
sceneWidget.Camera = customCamera;

// If Camera is null, it will fallback to Scene.Camera
sceneWidget.Camera = null; // This will use the default scene camera