Enable shadows
Configure settings for real-time and baked shadows for each Light component.
Read time 1 minuteLast updated 20 days ago
Each Light in a scene can cast the following types of shadows:
- Real-time shadows. Unity stores the shadows cast from each Light in shadow map textures. The textures update each frame; shadows move when the lights move.
- Baked shadows. The Unity lightmapper stores the shadows received by each GameObject in static lightmap textures, shadow mask textures, or Light Probes. Shadows don't move when the lights move.
To configure which type of shadows a Light casts, use the Inspector window of the Light component. For more information, refer to the following:
- Setting a light as real-time or baked.
- Lighting Mode, if you set the of a Light to Mixed.Light Mode
?
Set a GameObject to receive shadows
GameObjects receive real-time shadows by default.
To set a static GameObject so it receives shadows from baked shadows, follow these steps:
- Select the GameObject.
- In the Inspector window, in the Mesh Renderer component, enable Contribute Global Illumination.
- Set Receive Global Illumination to Lightmaps.
Set a GameObject to shadow other GameObjects
Follow these steps:
- Select the GameObject.
- In the Mesh Renderer component of the Inspector window, set Cast shadows to On.
Configure shadows
To configure shadows for your whole project or a specific scene, refer to the following:
- Lighting window reference
- Graphics settings
- Universal Render Pipeline (URP) asset reference
- Universal Renderer asset