Description
The BackgroundColor
property of the SceneCamera
class specifies the color used to clear the render target before rendering the scene. This property is essential for setting the background color of the scene when no other objects are rendered in the view.
Usage
To use the BackgroundColor
property, simply set it to a Color
value that represents the desired background color. This can be done at any point before rendering the scene to ensure the background is cleared to the specified color.
Example
// Example of setting the BackgroundColor property
SceneCamera camera = new SceneCamera();
camera.BackgroundColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); // Set to a gray color with full opacity