Version: Unity 6 (6000.0)
Language : English
Introduction to the 2D lighting system in URP
Light 2D component reference for URP

Prepare your project for 2D lighting

Follow the steps below to prepare your project for 2D lighting and 2D lighting effects.

The following is the general workflow to include 2D lighting in your project.

  1. Prepare your SpritesA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
    See in Glossary
    for lighting. For details, see Prepare and upgrade sprites for 2D lighting in URP.

  2. Set up normal mapA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.
    See in Glossary
    and mask Textures. 2D Lights can interact with normal map and mask Textures linked to Sprites to create advanced lighting effects, such as normal mapping. See Add normal map and mask textures to a sprite in URP.

  3. Create a 2D Light GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
    See in Glossary
    ; see Light 2D component reference for URP.

  4. Configure the 2D Renderer Data asset; see Configuring the 2D Renderer Asset.

  5. To define the shape and properties that a Light uses to determine the shadows it casts, use the Shadow Caster 2D component.

  6. (Optional) if you want to apply 2D Light effects to a pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
    See in Glossary
    art game, see Precise pixel scaling and rotation via the Pixel Perfect Camera in URP.

Create a Light 2D GameObject

Create a 2D Light GameObject by going to GameObject > Light and selecting one of the four available types.

Additional resources

Introduction to the 2D lighting system in URP
Light 2D component reference for URP