Documentation

Support

Unity Studio

Open Unity Studio

Unity Studio

Light component

Attach one or multiple lights to your object.
Read time 1 minuteLast updated 4 hours ago

Add a Light component to a GameObject to make the object emit light in your scene. Lights help define the mood, improve visibility, and draw attention to important objects or areas. Depending on the type you choose, you can create broad environmental lighting (Directional), focused beams (Spot lights), or lights that radiate outward from a single point (Point lights). To add a Light component:
  1. Select an object in the Hierarchy panel.
  2. In the Inspector window that displays, select Add Component > Light.

Example usages

When you move, rotate, or animate the object, the light moves with it. This makes the component useful for any light source that needs to stay attached to a GameObject. For example:
  • Flashlights or torches
  • Lamps, lanterns, and ceiling lights
  • Car, motorcycle, or bicycle headlights
  • Streetlights and traffic lights
  • A sun or moon
  • Warning lights, beacons, or sirens
  • Spotlights for stages, security systems, or searchlights
  • Glowing signs, screens, or decorative fixtures

Light component properties

To edit the light’s properties, select the object that contains the light in the Hierarchy panel. You can then edit its properties in the Inspector panel that shows. The Light component's properties change depending on the light type you choose. For more information about each type refer to Directional, Spot, and Point. Set Type to your preferred light to unlock these different settings:

Directional light properties

The following options are available when you set Type to Directional in the Light component:

Property

Description

Color Set the color your light emits.
Intensity Define how bright the light is in your scene. The higher the value, the more intense the light appears.
Shadow Type Set how this light casts shadows:
  • Soft Shadows: Shadows have blurred edges. Use for indirect or softer light sources, and to create a more natural, realistic look.
  • Hard Shadows: Shadows are deep and have sharp edges. Use for direct or harsh lights, or for more stylized visuals. These shadows are typically faster to render than soft shadows.
  • No Shadows: The light casts no shadows. Use for areas where you don't want shadows, UI elements, distant/background elements, or to improve performance.

Point light properties

The following options are available when you set Type to Point in the Light component:

Property

Description

RangeThe maximum distance the light reaches in all directions.
Color Set the color your light emits.
Intensity Define how bright the light is in your scene. The higher the value, the more intense the light appears.
Shadow Type Set how this light casts shadows:
  • Soft Shadows: Shadows have blurred edges. Use for indirect or softer light sources, and to create a more natural, realistic look.
  • Hard Shadows: Shadows are deep and have sharp edges. Use for direct or harsh lights, or for more stylized visuals. These shadows are typically faster to render than soft shadows.
  • No Shadows: The light casts no shadows. Use for areas where you don't want shadows, UI elements, distant/background elements, or to improve performance.

Spot light properties

The following options are available when you set Type to Spot in the Light component:

Property

Description

Inner Spot AngleThe angle where the light is at full strength. Use this to control the sharpness of the inner cone.
Outer Spot AngleThe angle of the cone of light. Use this to define how the light intensity falls off and the edge of the light beam.
RangeThe maximum distance the light reaches before it no longer affects objects.
Color Set the color your light emits.
Intensity Define how bright the light is in your scene. The higher the value, the more intense the light appears.
Shadow Type Set how this light casts shadows:
  • Soft Shadows: Shadows have blurred edges. Use for indirect or softer light sources, and to create a more natural, realistic look.
  • Hard Shadows: Shadows are deep and have sharp edges. Use for direct or harsh lights, or for more stylized visuals. These shadows are typically faster to render than soft shadows.
  • No Shadows: The light casts no shadows. Use for areas where you don't want shadows, UI elements, distant/background elements, or to improve performance.

Additional resources