Description
The ShadowsEnabled
property of the SceneLight
class allows you to enable or disable shadow rendering for the light source. When set to true
, shadows will be rendered based on the light's configuration. When set to false
, shadows will not be rendered, which can improve performance at the cost of visual realism.
Usage
To use the ShadowsEnabled
property, you need to have an instance of the SceneLight
class. You can then get or set the property to control shadow rendering:
SceneLight myLight = new SceneLight();
myLight.ShadowsEnabled = true; // Enable shadows
bool areShadowsEnabled = myLight.ShadowsEnabled; // Check if shadows are enabled
Example
// Create a new SceneLight instance
SceneLight myLight = new SceneLight();
// Enable shadow rendering for the light
myLight.ShadowsEnabled = true;
// Check if shadows are enabled
if (myLight.ShadowsEnabled)
{
// Shadows are enabled, perform additional logic if necessary
}