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


    public bool EditorOnly { get; set; }

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

    public BakeMode LightBakeMode { get; set; }

The light’s bake mode. See BakeMode.

    public Color LightColor { get; set; }

The light’s color.

    public int 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 in baked light or GIProbe.

    public bool LightNegative { get; set; }

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

    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. Default value: false.

    public bool ShadowReverseCullFace { get; set; }


    public BakeMode GetBakeMode()

Getter for LightBakeMode

    public Color GetColor()

Getter for LightColor

    public int GetCullMask()

Getter for LightCullMask

    public float GetParam(Param param)

    public Color GetShadowColor()

Getter for ShadowColor

    public bool GetShadowReverseCullFace()

Getter for ShadowReverseCullFace

    public bool HasShadow()

Getter for ShadowEnabled

    public bool IsEditorOnly()

Getter for EditorOnly

    public bool IsNegative()

Getter for LightNegative

    public void SetBakeMode(BakeMode bakeMode)

Setter for LightBakeMode

    public void SetColor(Color color)

Setter for LightColor

    public void SetCullMask(int cullMask)

Setter for LightCullMask

    public void SetEditorOnly(bool editorOnly)

Setter for EditorOnly

    public void SetNegative(bool enabled)

Setter for LightNegative

    public void SetParam(Param param, float value)

    public void SetShadow(bool enabled)

Setter for ShadowEnabled

    public void SetShadowColor(Color shadowColor)

Setter for ShadowColor

    public void SetShadowReverseCullFace(bool enable)

Setter for ShadowReverseCullFace

Inner Types


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


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