Description
The BackgroundColor
property of the CameraComponent
class specifies the background color of the camera's view when there is no 2D Sky present in the scene. This property is useful for setting a default color that will be displayed in areas where no other visual elements are rendered.
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 used as the background when no other sky or background elements are present in the scene.
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