Explore the properties you can use to add and configure shadows from 2D lights in the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary (URP).
For more information, refer to Add shadows from 2D lights in URP.
| Property | Description |
|---|---|
| Casting Source | Sets the source for the shape of the shadows. Unity displays the shape as a white outline in the Scene view. The options are the following:
|
| Casting Option | Sets how the GameObject casts shadows. The options are the following:
|
| Target Sorting Layers | Sets the 2D sorting layers that receive shadows from this 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. The default is Everything, which means other GameObjects on any sorting layer receive shadows. |
| Trim Edge | Increases or decreases the size of the Casting Source. A Trim Edge value of 1 means the Casting Source is its original size. Lower values decrease the size. This property is available only if you set Casting Source to SpriteA 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 Renderer. The default is 0.2. |
| Alpha Cutoff | Sets the minimum alpha value 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 must have to cast a shadow. The default is 0.1. This property is available only if you set Casting Source to Sprite RendererA component that lets you display images as Sprites for use in both 2D and 3D scenes. More info See in Glossary. |
| Edit Shape | If Casting Source is set to Shape Editor, select this button to edit the shape of the shadow. Unity displays the shape as a white outline in the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info See in Glossary view. Click and drag the white circles to move the points, or click a line to add a point. |
| Position | Sets the position of a point on the shape. This property is only available if you select Edit Shape. |