LightComponentExtensions Class
Namespace: Stride.EngineAssembly: Stride.Engine.dll
Extensions for the LightComponent class.
System.Object →
LightComponentExtensions
Derived from LightComponentExtensions:
public static class LightComponentExtensions
| Name | Description | |
|---|---|---|
| Methods | ||
| GetColor(LightComponent) | Gets the color from a LightComponent assuming that the Type is an instance of IColorLight |
|
| SetColor(LightComponent, Color3) | Sets the color from a LightComponent assuming that the Type is an instance of IColorLight |
|
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
| Type | Name | Description |
|---|---|---|
| LightComponent | light | The light component. |
Returns
| Type | Description |
|---|---|
| Color3 | The color of the light component |
Exceptions
| Type | Condition |
|---|---|
| System.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
| Type | Name | Description |
|---|---|---|
| LightComponent | light | The light component. |
| Color3 | color | The light color. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | If the LightComponent doesn't contain a color light type IColorLight |