Color ClearColor

robot_2Generated
code_blocksInput

Description

The ClearColor field in the SceneWorld class is used to set the clear color of the scene. This color is displayed when no other objects are drawn in the scene. However, this field is marked as obsolete, and it is recommended to use SceneCamera.BackgroundColor instead for setting the background color of the scene.

Usage

To set the clear color of a SceneWorld, you would typically assign a Color value to the ClearColor field. However, since this field is obsolete, you should use SceneCamera.BackgroundColor for this purpose.

Example

// Example of setting the clear color (obsolete)
SceneWorld sceneWorld = new SceneWorld();
sceneWorld.ClearColor = new Color(0.5f, 0.5f, 0.5f); // This is obsolete

// Recommended approach
SceneCamera camera = new SceneCamera();
camera.BackgroundColor = new Color(0.5f, 0.5f, 0.5f);