Provides a base class for different kinds of light nodes.
    public abstract class Light : VisualInstance

Light is the abstract base class for light nodes, so it shouldn’t be used directly (it can’t be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.

Inheritance Chain

Derived Classes

Properties

    public bool EditorOnly { get; set; }

If true, the light only appears in the editor and will not be visible at runtime.

    public BakeMode LightBakeMode { get; set; }

The light’s bake mode. See BakeMode.

    public Color LightColor { get; set; }

The light’s color.

    public uint LightCullMask { get; set; }

The light will affect objects in the selected layers.

    public float LightEnergy { get; set; }

The light’s strength multiplier.

    public float LightIndirectEnergy { get; set; }

Secondary multiplier used with indirect light (light bounces). This works on both BakedLightmap and GIProbe.

    public bool LightNegative { get; set; }

If true, the light’s effect is reversed, darkening areas and casting bright shadows.

    public float LightSpecular { get; set; }

The intensity of the specular blob in objects affected by the light. At 0 the light becomes a pure diffuse light.

    public float ShadowBias { get; set; }

Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed.

    public Color ShadowColor { get; set; }

The color of shadows cast by this light.

    public float ShadowContact { get; set; }

Attempts to reduce Param.ShadowBias gap.

    public bool ShadowEnabled { get; set; }

If true, the light will cast shadows.

    public bool ShadowReverseCullFace { get; set; }

Methods

    [Obsolete("GetBakeMode is deprecated. Use the LightBakeMode property instead.")]
    public BakeMode GetBakeMode()

Getter for LightBakeMode

    [Obsolete("GetColor is deprecated. Use the LightColor property instead.")]
    public Color GetColor()

Getter for LightColor

    [Obsolete("GetCullMask is deprecated. Use the LightCullMask property instead.")]
    public uint GetCullMask()

    [Obsolete("GetParam is deprecated. Use the ShadowContact property instead.")]
    public float GetParam(Param param)

    [Obsolete("GetShadowColor is deprecated. Use the ShadowColor property instead.")]
    public Color GetShadowColor()

Getter for ShadowColor

    [Obsolete("GetShadowReverseCullFace is deprecated. Use the ShadowReverseCullFace property instead.")]
    public bool GetShadowReverseCullFace()

Getter for ShadowReverseCullFace

    [Obsolete("HasShadow is deprecated. Use the ShadowEnabled property instead.")]
    public bool HasShadow()

Getter for ShadowEnabled

    [Obsolete("IsEditorOnly is deprecated. Use the EditorOnly property instead.")]
    public bool IsEditorOnly()

Getter for EditorOnly

    [Obsolete("IsNegative is deprecated. Use the LightNegative property instead.")]
    public bool IsNegative()

Getter for LightNegative

    [Obsolete("SetBakeMode is deprecated. Use the LightBakeMode property instead.")]
    public void SetBakeMode(BakeMode bakeMode)

Setter for LightBakeMode

    [Obsolete("SetColor is deprecated. Use the LightColor property instead.")]
    public void SetColor(Color color)

Setter for LightColor

    [Obsolete("SetCullMask is deprecated. Use the LightCullMask property instead.")]
    public void SetCullMask(uint cullMask)

    [Obsolete("SetEditorOnly is deprecated. Use the EditorOnly property instead.")]
    public void SetEditorOnly(bool editorOnly)

Setter for EditorOnly

    [Obsolete("SetNegative is deprecated. Use the LightNegative property instead.")]
    public void SetNegative(bool enabled)

Setter for LightNegative

    [Obsolete("SetParam is deprecated. Use the ShadowContact property instead.")]
    public void SetParam(Param param, float value)

    [Obsolete("SetShadow is deprecated. Use the ShadowEnabled property instead.")]
    public void SetShadow(bool enabled)

Setter for ShadowEnabled

    [Obsolete("SetShadowColor is deprecated. Use the ShadowColor property instead.")]
    public void SetShadowColor(Color shadowColor)

Setter for ShadowColor

    [Obsolete("SetShadowReverseCullFace is deprecated. Use the ShadowReverseCullFace property instead.")]
    public void SetShadowReverseCullFace(bool enable)

Setter for ShadowReverseCullFace

Inner Types

BakeMode

Name Value Description
Disabled 0 Light is ignored when baking.
[b]Note:[/b] Hiding a light does [i]not[/i] affect baking.    
Indirect 1 Only indirect lighting will be baked (default).
All 2 Both direct and indirect light will be baked.
[b]Note:[/b] You should hide the light if you don’t want it to appear twice (dynamic and baked).    

Param

Name Value Description
Energy 0  
IndirectEnergy 1  
Specular 2  
Range 3  
Attenuation 4  
SpotAngle 5  
SpotAttenuation 6  
ContactShadowSize 7  
ShadowMaxDistance 8  
ShadowSplit1Offset 9  
ShadowSplit2Offset 10  
ShadowSplit3Offset 11  
ShadowNormalBias 12  
ShadowBias 13  
ShadowBiasSplitScale 14  
Max 15 Represents the size of the [enum Param] enum.
Tags: