2D lighting, cast shadows only from some lights

I have a gameobject with a shadow caster 2d. I want to put a light inside that game object that is not affected by that shadow caster 2D but by others. It's possible?

You need to define a new Sorting Layer (It's on SpriteRenderer component). Then in your Light2D change which sorting layers light affects.

I don't get it to work, I have the gameobject with the shadowcaster in the "characters" layer and the target sorting layers of the light 2D in "ground", but the shadowcaster still affects this light


I believe that the "shadow caster 2D" is not linked to the "Sorting Layer" of the "Sprite Renderer" and is affected by all the lights. Any suggestions?
5839441--619651--luces1.jpg 5839441--619654--luces2.jpg 5839441--619657--luces3.jpg 5839441--619660--luces4.jpg

Hi,

Did you get any idea to do that?
I'm also trying to figure it out but I haven't be able to do it.

Hi, I don't know why, but Shadow Caster doesn't work, when some light on scene hasn't got Default target sorting layer checked.