Color ClearColor

book_4_sparkGenerated
code_blocksInput

Description

The ClearColor field in the SceneWorld class is used to set the clear color of the scene. This color is visible 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 new implementations.

Example

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

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