Description
The Radius
property of the SceneLight
class specifies the radius of the light in units. This property determines how far the light emitted from the SceneLight
object will reach within the scene. Adjusting the radius can affect the area illuminated by the light source.
Usage
To use the Radius
property, you can get or set its value to control the size of the light's influence in the scene. A larger radius will result in a wider area being lit, while a smaller radius will confine the light to a more localized area.
Example
// Create a new SceneLight object
SceneLight myLight = new SceneLight();
// Set the radius of the light to 10 units
myLight.Radius = 10.0f;
// Retrieve the current radius of the light
float currentRadius = myLight.Radius;
// Output the current radius
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use in-game debugging tools or UI elements to display values
// Debug.Log($"Current Light Radius: {currentRadius}");