Description
The BackgroundColor
property of the CameraComponent
class specifies the color that will be used as the background of the camera's view when there is no 2D Sky present in the scene. This property is useful for setting a default background color for the camera's viewport.
Usage
To set the background color of a camera, you can assign a Color
value to the BackgroundColor
property of a CameraComponent
instance. This color will be displayed in the camera's view when no other background (such as a skybox) is present.
Example
// Example of setting the background color of a camera
CameraComponent camera = new CameraComponent();
camera.BackgroundColor = new Color(0.5f, 0.5f, 0.5f); // Set to a gray color