Class LightComponentExtensions
Extensions for the LightComponent class.
public static class LightComponentExtensions
- Inheritance
-
LightComponentExtensions
Methods
GetColor(LightComponent)
Gets the color from a LightComponent assuming that the Type is an instance of IColorLight
public static Color3 GetColor(this LightComponent light)
Parameters
light
LightComponentThe light component.
Returns
- Color3
The color of the light component
Exceptions
- InvalidOperationException
If the LightComponent doesn't contain a color light type IColorLight
SetColor(LightComponent, Color3)
Sets the color from a LightComponent assuming that the Type is an instance of IColorLight
public static void SetColor(this LightComponent light, Color3 color)
Parameters
light
LightComponentThe light component.
color
Color3The light color.
Exceptions
- InvalidOperationException
If the LightComponent doesn't contain a color light type IColorLight