Version: Unity 6.0 (6000.0)
Language : English
Light Blend Styles component reference for URP
Precise pixel scaling and rotation via the Pixel Perfect Camera in URP

Shadow Caster 2D component reference

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:
  • Sprite Skin: Uses the bounding box of the bones defined in the Sprite Skin component attached to the GameObject. This option is available only if you add a Sprite Skin component to the GameObject.
  • Sprite Renderer: Uses the shape defined in the Sprite Editor window. Uses the shape in the Skinning Editor tab if the GameObject has a Sprite Skin component, otherwise uses the shape in the Custom Outline tab.
  • Collider 2D: Uses the shape defined in the collider component attached to the GameObject. This option is available only if you add a collider component to the GameObject, for example a Box Collider 2D component.
  • Shape Editor: Uses the shape defined in the Edit Shape property.
  • None: Casts no shadows.
Casting Option Sets how the GameObject casts shadows. The options are the following:
  • Self Shadow: Casts shadows only onto itself.
  • Cast Shadow: Casts shadows only onto other objects.
  • Cast and Self Shadow: Casts shadows onto itself and other objects.
  • None: Casts no shadows.
The default is Cast Shadow.
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.

Additional resources

Light Blend Styles component reference for URP
Precise pixel scaling and rotation via the Pixel Perfect Camera in URP