Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

2D Lighting Bug: Any light source defaults everything to be lit

Discussion in '2D Experimental Preview' started by diesoftgames, Jun 8, 2020.

  1. diesoftgames


    Nov 27, 2018
    I'm not sure when this happened, and I tried going back to other versions of Unity, but couldn't pinpoint anything, but perhaps someone knows something about this bug. Here's what's happening in my project now:

    Say I have a project with sprites on two different sorting layers. I create a global light with intensity 1, but it's only targeting one of the two layers. BOTH layers will now be lit as if by a 1 intensity global light. Now if I reduce the intensity, the correct sorting layer sprite will have it's lighting reduced appropriately, but the other one, which the light should not even be affecting, will stay as if lit by a 1 intensity global light. If I drop it to 0, and then toggle the game object's active state, that is the only way I can get it to stop lighting layers it's not targeting.

    tldr; The presence of ANY 2D light causes unlit sprites to appear as if lit by a 1 intensity global light. This bug persists in edit and runtime. Any help with debugging what might be the source of this would be appreciated.