LightComponent: {
    affectDynamic: boolean;
    affectLightmapped: boolean;
    bake: boolean;
    bakeDir: boolean;
    cascadeDistribution: number;
    castShadows: boolean;
    color: number[];
    cookie: number;
    cookieAngle: number;
    cookieAsset: number;
    cookieChannel: string;
    cookieFalloff: boolean;
    cookieIntensity: number;
    cookieOffset: number[];
    cookieScale: number[];
    enabled: boolean;
    falloffMode: number;
    innerConeAngle: number;
    intensity: number;
    isStatic: boolean;
    layers: number[];
    normalOffsetBias: number;
    numCascades: number;
    outerConeAngle: number;
    range: number;
}

Light Component Properties.

Type declaration

  • affectDynamic: boolean

    If true the light will affect non-lightmapped objects.

    true
    
  • affectLightmapped: boolean

    If true the light will affect lightmapped objects.

    false
    
  • bake: boolean

    If true the light will be rendered into lightmaps.

    false
    
  • bakeDir: boolean

    If true and bake is true, the light's direction will contribute to directional lightmaps.

    true
    
  • cascadeDistribution: number

    The distribution of subdivision of the camera frustum for individual shadow cascades.

    0.5
    
  • castShadows: boolean

    If true, the light will cause shadow casting models to cast shadows.

    false
    
  • color: number[]

    An array of 3 numbers that represents the color of the emitted light.

    [1,1,1]
    
  • cookie: number

    The id of a projection texture asset. Must be 2D for spot and cubemap for omni (ignored if incorrect type is used).

  • cookieAngle: number

    Angle for spotlight cookie rotation.

    0
    
  • cookieAsset: number

    The id of a texture asset that represents that light cookie.

    null
    
  • cookieChannel: string

    Color channels of the projection texture to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination.

    "rgb"
    
  • cookieFalloff: boolean

    Toggle normal spotlight falloff when projection texture is used. When set to false, spotlight will work like a pure texture projector (only fading with distance).

    true
    
  • cookieIntensity: number

    Projection texture intensity.

    1
    
  • cookieOffset: number[]

    Spotlight cookie position offset.

    [0,0]
    
  • cookieScale: number[]

    Spotlight cookie scale.

    [1,1]
    
  • enabled: boolean

    Whether the component is enabled.

    true
    
  • falloffMode: number

    Controls the rate at which a light attenuates from its position.

    0
    
  • innerConeAngle: number

    The angle at which the spotlight cone starts to fade off. The angle is specified in degrees. Affects spot lights only.

    40
    
  • intensity: number

    The intensity of the light, this acts as a scalar value for the light's color. This value can exceed 1.

    1
    
  • isStatic: boolean

    Mark light as non-movable (optimization).

    false
    
  • layers: number[]

    An array of layer id's that this light will affect.

    [0]
    
  • normalOffsetBias: number

    Normal offset depth bias.

    0.05
    
  • numCascades: number

    Number of shadow cascades.

    1
    
  • outerConeAngle: number

    The angle at which the spotlight cone has faded to nothing. The angle is specified in degrees. Affects spot lights only.

    45
    
  • range: number

    The distance from the spotlight source at which its contribution falls to zero.

    10