Unity Issue Tracker - Spotlight 2D can get 'captured' by the sprite when shadows enabled
Closed
UUM-75143
Spotlight 2D can get 'captured' by the sprite when shadows enabled
Unity: 2D
2D
As Designed
6.0.X
From the video this appears to be by design.
Basically the shadow casters acts like walls. As for best practices they should be kept inside the sprites (and smaller than the sprites).
Steps to reproduce:
Open attached project.
Open 'SampleScene'.
Ensure that scene view is in Shaded Draw mode, or observe the Game view window.
In Hierarchy, select "Spotlight 2D" and move it across in the scene, between the two sprites.
Actual results: When the spotlight passes through a sprite, the light gets captured or confined within the sprite shape and everywhere else is cast in shadow.
Expected results: Shadow continues casting as expected for all sprite objects in scene.
Reproducible with versions: 6000.0.10f1, 2023.1.12f1 {}(See notes & Can't test){*}
Not reproducible with versions: 2023.1.0a17, 2022.3.35f1
Can't test with versions:
2023.1.0a18 -> 2023.1.11f1, the lights and shadows do not seem to be working at all.
2021.3.40f1, can't create projects on Ubuntu 24.
Tested on (OS): Ubuntu 24.04
Notes:
FAV may not be correct as there are a few versions where the lights and shadows do not appear to be working.
Attached video of this behaviour occurring.
Project might not display sprites due to a layer order clash, set 'Square' order to -1 to fix.
Early 2023.1 editors will throw invalid dependencies with the repro project, attached an extra project called 2023-1-Project.zip to test those versions.
Prioritise and Follow this issue
Have a workaround or additional info about this issue?