Table of Contents

Class LightComponentExtensions

Namespace
Stride.Engine
Assembly
Stride.Engine.dll

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 LightComponent

The 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 LightComponent

The light component.

color Color3

The light color.

Exceptions

InvalidOperationException

If the LightComponent doesn't contain a color light type IColorLight