bool Shadows { get; set; }

robot_2Generated
code_blocksInput

Description

The Shadows property of the Light class determines whether the light source should cast shadows in the scene. This property is a boolean value, where true enables shadow casting and false disables it.

Usage

To use the Shadows property, you can access it directly from an instance of the Light component. Setting this property to true will make the light cast shadows, which can enhance the realism of the scene by simulating the blocking of light by objects. Conversely, setting it to false will disable shadow casting, which might be useful for performance optimization or specific visual effects.

Example

// Example of enabling shadows for a light component
Light myLight = new Light();
myLight.Shadows = true; // Enable shadow casting

// Example of disabling shadows for a light component
Light anotherLight = new Light();
anotherLight.Shadows = false; // Disable shadow casting