ClearFlags ClearFlags { get; set; }

robot_2Generated
code_blocksInput

Description

The ClearFlags property of the CameraComponent class specifies the clear flags for the camera. Clear flags determine how the camera clears the screen before rendering a new frame. This can include clearing the color buffer, depth buffer, or both, depending on the selected flag.

Usage

To use the ClearFlags property, you can set it to one of the values defined in the Sandbox.ClearFlags enumeration. This will dictate how the camera clears the screen before rendering each frame.

Example

// Example of setting the ClearFlags property
CameraComponent camera = new CameraComponent();
camera.ClearFlags = ClearFlags.Color | ClearFlags.Depth;