Enable shadows
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 lightmapperA tool in Unity that bakes lightmaps according to the arrangement of lights and geometry in your scene. More info
See in Glossary 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:
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 RendererA mesh component that takes the geometry from the Mesh Filter and renders it at the position defined by the object’s Transform component. More info
See in Glossary 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:
Additional resources
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。