I have been working on a 2D platformer game that relies on URP’s 2D lighting system. I just upgraded my Unity to 2021.1 today and for some reason, all the point light components seem to be giving light in the wrong positions in Game Mode. However, they work perfectly fine in Scene View. To give an example:
See how the light is actually originating from the portal?
Did anyone else found that their 2D lights are acting weird since the last update? Do you know why this might be happening?
Hi,
I have the same problem. The problem is only when you use a Camera Stack. With other camera the lights works well.
The problem is not only the position but olso the rotation, if you use only spot light you can think that is only the position but try also to use “freeform”.
I tried to create the bug with version 2021.2.0f1 in an empty project:
1 main camera
1 camera stack
1 sprite
1 light 2d
and you got the problem
with the new release 2022.1.0a13 the problem with camera stack and light 2D is fixed also I tried upgrading my project and all works fine (all… I need to test evrythink but the light works )
I have the same problem in Unity 2021.2.8f1. I have a 2d spot light attached to my player, I just updated for 2021.1.11f1 in which the 2d lights were working fine. The 2D spot and sprite lights in the 2021.2.8f1 version are correct in the editor scene view when not playing . As soon as I click play the 2d lights seem to always be in the correct x position but are placed and move incorrectly on the Y axis this also happens when I build the project.
It is really strange, I observe the transform positions of the child 2d spot lights and sprite lights and the position, rotations and scales do not change yet the child seems to be in completely different y positions than its parent. I’m going back to using 2021.1.11f1 until this is fixed.
The same issue is still present in Unity 2021.3.7f1 LTS. That is pretty bad for an LTS version, the last known working version for me is 2021.1.28f1, all versions after this have the bug with URP, camera stacks and 2d lights. I’m just about to see if it is fixed in 2022.1.12f1, hopefully it is as this is a major set back for my game on all platforms.
Same issue, still today. This is really bad for an LTS version. Please devs give us an update on what’s going on, it’s a very crucial thing. All I can find is an issue tracker marked “Solved” in URP 13.1 but we shouldn’t need to update so many versions for this.
We can only fix bugs in new releases, so at the very least you need to install 2021.3.18. However, its likely that you could still use 2021.3.16 as the 2D URP code should be compatible. But I’d recommend using 2021.3.18 as there might be other bug fixes.