Hello,
I’m using Unity 2021.3 LTS and working on a 2D URP project.
- I have two sprites, spriteA is in Default layer and spriteB is in a layer called “Highlighted”.
- There is one Global Light 2D in Default layer.
- There are two cameras, one main camera with Culling Mask covers only Default layer, and the other camera which is overlay stacked on the main camera and it’s got a Culling Mask covering only Highlighted layer.
With these setup, the spriteB doesn’t have lighting and is black, unless I set the layer of the global light 2D to Highlighted, but in that case, Sprite A is black. So I created another global light 2D in Highlighted layer, then everything is correct, however I got an error message “More than one global light on layer Sprite for light blend style index 0”. “Sprite” is the name of the sprite Sorting Layer.
It seems everything works fine even with the error, but I’m wondering if I’m using the global 2D correctly and how can I fix the error?
Please let me know if any addtional information is needed.
Thanks