Explore the properties you can use to add and configure shadows from 2D lights in the Universal Render Pipeline (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 GameObject. 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 Sprite Renderer. The default is 0.2. |
| Alpha Cutoff | Sets the minimum alpha value a pixel must have to cast a shadow. The default is 0.1. This property is available only if you set Casting Source to Sprite Renderer. |
| 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 Scene 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. |