Search Unity

Question Problem with 2D lights on URP

Discussion in 'Universal Render Pipeline' started by pigwejq, Nov 20, 2020.

  1. pigwejq

    pigwejq

    Joined:
    Dec 15, 2018
    Posts:
    5
    Hi
    I have a problem with 2D Lights with 2D Renderer. I have about 7 sorting layers in the game. I created a flashlight that has PointLight 2D on 3 of them. Some objects started to behave strangely when they are lit. They get a shadow that wasn't on them before because they were illuminated by GlobalLight 2D. It looks as if the GlobalLight is not affecting the object illuminated with extra light any more.
    8366CE8B-1083-4D91-B613-FE350C2C60C1.PNG
    (The illuminated area of the object, where the light falls is darker than it was before.)

    Is it a bug or I use the lights wrongly?
     
  2. pigwejq

    pigwejq

    Joined:
    Dec 15, 2018
    Posts:
    5
    I found a solution. Objects without light were illuminated despite its absence (my mistake, I did not notice that not all layers are marked in Global Light), when illuminated by a flashlight they started to behave properly, so they darkened.