How to add 2D Shadows in Unity

Creating a visually appealing 2D game isn’t just about great artwork. It’s about depth, contrast, lighting and yes, shadows. But how do you create 2D shadows in Unity? Today, I’ll show you how simple its to add shadows to your 2D game in Unity.
Video Tutorial
Getting Started with Unity’s 2D Lights
Unity has a powerful 2D Renderer as part of the Universal Render Pipeline (URP). To enable shadows, you need to make sure your project is set up correctly. If you have created a new 2D URP project, you don’t have to worry about this, you can directly go to setting up your lights and shadows.
If you are not using URP here’s how to switch:
- Right click on your project window and go to
Create >Rendering >URP Asset(with 2D renderer)
. If you don’t see the option, then install the URP, 2D renderer package from package manager. - Go to
Edit > Project Settings > Graphics
and assign the URP Asset you created.

Adding a Light Source
Once URP is set up, we can add 2D Lights to the scene.
- Create a Light – Go to
GameObject > Light > Spot Light 2D
. - Adjust the Light Settings – Set the Intensity, Color, and Radius to match your game’s aesthetic.
- Enable Shadows – Check the
Cast Shadows
option in the Inspector panel.
Making Objects Cast Shadows
Now, just adding a light isn’t enough. We need objects to actually cast shadows!
- Select the 2D game objects which needs to cast shadow. Make sure they have sprite renderer component.
- Add a Shadow Caster 2D component (
AddComponent > Rendering > Shadow Caster 2D
). - Ensure the
Self Shadows
option is enabled if you want internal shadows. - Play with the settings to get the best look.

Fine-Tuning the Shadows
Shadows can make or break the visual appeal. Some tips I found helpful:
- Adjust the Light Falloff to make soft or hard shadows.
- Experiment with multiple light sources for dramatic effects.
- Use Normal Maps on sprites to add depth.
Conclusion
Adding 2D shadows in Unity is easier than you think! With URP and 2D lights, you can bring your game to life in just a few steps. If you’re working on a 2D game, give shadows a try. It makes a huge difference!
Have you used 2D shadows in Unity before? Let me know your experiences in the comments!