2D lights
Sprites and tilemaps normally show their pictures as they are. Add a Light 2D to a scene and they are lit instead, as with Unity's 2D renderer:
- a dark cave lit by torches;
- a night street under lamps;
- a spotlight sweeping a prison yard.

Add a light
+ Add → Lights:
- Global Light 2D lights everything the same. Use one, dim and a little blue, so the dark parts of a level stay visible.
- Spot Light 2D lights a circle round itself, or a cone. Put one on each torch, lamp or window.
- Freeform Light 2D lights a shape you draw: a shaft of light from a window, a lit doorway, a pool of light on a floor.
- Sprite Light 2D lights with a picture: the panes of a window, a stained-glass pattern, a flashlight's ring.
As soon as a scene has a Light 2D, its sprites and tilemaps show only the light of its 2D lights: where no light reaches is black. Lights add up, so two torches side by side make a brighter patch.
3D meshes, particles and UI are not affected: 3D meshes keep using the 3D lights.
Light 2D settings
| Setting | What it does |
|---|---|
| Light Type | Global: the whole scene. Spot: round the object (Unity's name for the round light). Freeform: a shape. Sprite: a picture. |
| Color, Intensity | The light's colour and how strong it is. Above 1 makes things brighter than their picture. |
| Inner Radius | Full light out to here (metres). |
| Outer Radius | No light from here on. Between the two, the light fades out. |
| Inner Angle, Outer Angle | 360 = all round. Lower makes a cone: full light inside the inner angle, fading out to the outer one. The cone points along the object's up: turn the object (rotation Z) to aim it, 180 points down. |
| Falloff Strength | How quickly the light fades between the radii: 0 stays bright to the edge, 1 fades fast. |
| Shadows, Shadow Strength | Shadow Caster 2D objects block the light (see below). At 1 none of this light gets into the shadow; at 0.5 half does. |
| Shadow Softness | 0 = sharp shadow edges. Higher makes the light act as if it had a size, so shadow edges blur, more the farther they are from what casts them. |
| Normal Maps, Distance | Shade sprites, tilemaps and Sprite Shapes that have a normal map by which way their bumps face (see below). Distance is how high above them the light is: low lights show bumps more. |
| Volumetric Intensity | The light also shows in the air, over everything: the haze round a torch, the beam of a lamp, a shaft of moonlight (Freeform) or a window's glow (Sprite). 0 = off. Not for Global lights. |

Freeform lights

A Freeform light is a shape of full light with a soft rim round it. Select it to see its points in the 2D view: drag a point to move it, double-tap the outline to add one, select a point and press Delete to remove it. The numbers are in the Light 2D card too (+ Point adds one).
- Falloff is how wide the soft rim is, in metres.
- Falloff Strength is how quickly the light fades across the rim.
Sprite lights
A Sprite light is a picture of light: pick its Sprite (any picture) and its Size (the longer side, in metres). Its colours tint the light and its transparent parts give none. Turn the object to turn the picture.
In the scene view each Spot light shows its outer reach (and its inner one, fainter) as a circle or a cone. The view draws the lights while you edit, so you see the scene as it will look.
Shadows
- Add a Shadow Caster 2D component to the objects that block light: walls, pillars, crates, the level's tilemap.
- Switch on Shadows on the lights that should cast them.
A caster's shape is its collider's shape. For a tilemap that is its solid tiles; for a sprite, its collision polygon; for a shape, its box, circle or capsule. It doesn't need a collider, though: without one, the shape is what the collider would be.
Self Shadows (off by default): off, the light still reaches the caster itself and only what is behind it is dark, so a wall stays lit on the side facing the torch. On, the caster is in its own shadow too.
Shadows are sharp by default. Shadow Softness blurs their edges: the light is drawn several times, each casting its shadows from a different point of a small disc, so the edges fade the farther they are from the caster. Each of those draws costs a little, so keep softness for the lights that need it.
Freeform and Sprite lights cast shadows from their object's position.
Normal maps

A normal map is a second picture that tells, for each pixel, which way the surface faces. With one, a flat sprite of bricks shows its bevels lit on the side facing the lamp and dark on the other side, and the light moves over them as the lamp moves.
- Give the picture a Normal map: a second picture laid out like it, in the usual colours (blue-ish: red = right, green = up, blue = out of the picture). Paint tools and normal-map makers export these.
- Sprite: Normal map in its card, under Render texture (the same frames as the sprite).
- Tilemap: Normal map in its card, laid out like the tile sheet (the same tiles in the same places).
- Sprite Shape: Fill normal map for the fill picture, and a Normal map in each edge range. The edges bend along the outline, and so do their bumps.
- Switch on Normal Maps on the lights that should use them. Distance is how high above the pictures the light is.
Pictures without a normal map, Unlit ones, and lights with Normal Maps off are lit as before. Global lights don't use normal maps.
The Ember Crypt showcase is a whole game lit this way: a lantern with Normal Maps over brick, stone and a rubble Sprite Shape.

Unlit sprites and tilemaps
Some things should show as they are whatever the light: a glowing coin, a lit window, a sky backdrop. Set the Sprite's or Tilemap's Material to Unlit (Unity's Sprite-Unlit-Default). Lit is the default.
In events and scripts
The settings can change while the game runs: a flickering torch, a lamp that switches off, a light that follows the hero.
- Events: Set component setting on the light's object (for example light2d → intensity). Moving the object moves its light.
- Scripts:
entity.component("light2d").intensity = 0.8 + Math.random() * 0.4. An object's Enabled switch turns its light on and off.
Good to know
- 2D lights work in the X–Y plane, which is how a side-on or top-down 2D game is laid out (see 2D games).
- The light is worked out per pixel of the screen. Anything drawn where a shadow falls is darkened, even a sprite standing in front of the wall that casts it. Set things that must stay bright to Unlit.
- Each light with shadows is one more drawing pass a frame. A dozen torches are fine on a phone; hundreds are not.
- Exported games, the Android app and desktop builds draw 2D lights the same way.