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.

Light2D experimental : light through walls / bulb visible / memory problem

Discussion in '2D Experimental Preview' started by Zelop, Sep 8, 2019.

  1. Zelop


    Jul 28, 2016
    Hello !
    I have 3 problems with the experimental light2D.

    As you can see in the picture, the light pass through the walls. I searched some solutions but all was for the classic light script (not the light2D).
    The second situation is that the bulb is visible in the game (it normally shows only on the editor).

    One last problem (not in the picture) is that sometimes, some of my gameobject disappear from the editor and the game (only the sprite). It seems to be a problem of memory but I just made one level, and it doesn't seem that expensive in memory in my opinion.

    Thank you for your responses :)

    Attached Files:

  2. dquek


    Unity Technologies

    Apr 17, 2018
    Hi there, @Zelop

    "light pass through the walls"
    - Did you try the Shadows feature yet in Universal Render Pipeline v7.1?
    - You will need to add a Shadow caster component on the Wall and make sure your light has shadow intensity.
    Docs here:

    "bulb is visible in the game"
    - Is this in play mode or in Standalone Build?

    "gameobject disappear"
    - Can you check the object Position Z value?

    You could file a bug report with a slice of the repro project through = Unity > Help > Report a Bug...
    This helps us to debug and hopefully ship a fix faster.

    If not you can reply here in the forums with more info.
  3. Baste


    Jan 24, 2013
    You've probably turned on Gizmos in the game view. It's a toggle in the upper right corner of the screen.
    dquek likes this.
  4. JoaoSantos


    Mar 31, 2014
    @dquek I added the Shadow Caster 2d in URP 7.4 (Unity 2019).4, but its didn't show me the property: Shadow Volume Intensity.


    I thing the property will help me with opaque shadow effect in walls, because I having the same problem of @Zelop


    As you can see, the light transpose the wall and generate a shadow and a extra light in radius complement. But in project the wall must block the light.

    Attached Files:

    Last edited: Jun 16, 2020