Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

2D Shadow Caster with multiple lights - Shadows don't work correctly?

Discussion in '2D Experimental Preview' started by mariusB1337, Aug 17, 2020.

  1. mariusB1337

    mariusB1337

    Joined:
    Apr 28, 2019
    Posts:
    2
    Unity 2020.1
    URP 8.2.0

    With multiple light sources the shadows from Shadow Caster 2D don't work correctly. See attached image: With both lights turned on, the character shouldn't have this long shadow but the light from the left torch doesn't seem affect its shadow.
     

    Attached Files:

    Tratteo likes this.
  2. Ellbell

    Ellbell

    Joined:
    Jun 25, 2019
    Posts:
    5
    I found a solution. Edit ShadowCaster2D.cs at line 121 to always return true. This fixed the issue for me!
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    7,181
    It is good that you are trying to help but I would ask that you please stop cross-posting. You have posted this a total of four times now and are necroing old threads too.

    Thanks.
     
unityunity