Search Unity

Question Transparent 3D Objects behind and infront of Canvas not showing properly

Discussion in 'UGUI & TextMesh Pro' started by Sangemdoko, Mar 22, 2023.

  1. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    222
    Hi,

    I am using Unity 2020.3 with URP 10.8.1

    In my game I'm drawing a ScreenSpace Camera canvas to show the score board. I use ScreenSpace Camera instead of Overlay beacuse I want to show the 3D potions without using a Render Texture (Render Textures limits how well post processing work).

    The issue I'm having is that transparent objects and outlines show on top of the UI. Even though the UI is well infront.



    I tried changing the sorting Layer and order in layer
    upload_2023-3-22_18-42-47.png

    But i causes all transparent objects to be hidden behind but it also makes the glass of the potion to disapear.
    The outlines are still visible but I think that's because I'm using a RenderFeature for those.
    upload_2023-3-22_18-43-35.png

    Any idea how to prevent that? Could I perhaps make a Render Feature on the canvas backgroud panel that hides anything behind?