Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

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

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

  1. Zelop

    Zelop

    Joined:
    Jul 28, 2016
    Posts:
    8
    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

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    70
    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: https://docs.unity3d.com/Packages/c...s.universal@7.1/manual/2DLightProperties.html

    "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?

    Also,
    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

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,538
    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

    JoaoSantos

    Joined:
    Mar 31, 2014
    Posts:
    20
    @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.

    upload_2020-6-11_22-23-8.png

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

    upload_2020-6-11_22-17-11.png

    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
unityunity