Question by
AtaTurkoglu · Jan 16 at 06:38 PM ·
lighting2d spritessorting layers
Light2D Target Sorting Layer not working as intended
In the image below, the sprite on the left is the player with the sorting layer "Teleportable". The big rectangle belongs to the "Portal Preview" sorting layer. I want the lights to affect the "Teleportable" sorting layer but not the "Portal Preview" sorting layer. When I add the "Teleportable" layer to the target sorting layers, "Portal Preview" sorting layer also gets affected by the light as in the image below.
a.png
(102.5 kB)
screenshot-2022-01-16-213026.png
(79.2 kB)
Comment
Answer by GameNot · Jan 21 at 12:22 PM
I have the same problem, but bigger. When i change sorting layer on light, it looks like this affect light intesivity.
Unity please help!
screenshot-10.jpg
(272.1 kB)
screenshot-9.jpg
(270.7 kB)
Answer by AtaTurkoglu · Jan 21 at 01:03 PM
Weirdly enough, removing the "Fog" sorting layer from the list fixed it (if you call it fixing).
Your answer
![](https://koobas.hobune.stream/wayback/20220613051747im_/https://answers.unity.com/themes/thub/images/avi.jpg)