Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    LightComponentExtensions Class

    Namespace: Stride.Engine
    Assembly: 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

    | Improve this Doc View Source

    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


    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation