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.
  2. Dismiss Notice

Question object on top of everything

Discussion in 'Universal Render Pipeline' started by Rafaat_Ashour, Jan 13, 2023.

  1. Rafaat_Ashour

    Rafaat_Ashour

    Joined:
    Sep 25, 2020
    Posts:
    50
    hello all,

    i have issue with my game, i have a UI its about a little panel with 4 object in it, my issue is that this panel get enter with other object in the game while moving, now i was think sorting layer would fix the issue but it didn't, i try use camera stacking and only showing ui layer in that camera, it work fine but the issue its mobile game and once i use stack camera it cut my performance 50%, game now work on 30 fps on high end device,

    does anyone know any work around that ?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,394
    Just set the canvas to screen space
     
  3. Rafaat_Ashour

    Rafaat_Ashour

    Joined:
    Sep 25, 2020
    Posts:
    50
    this would show the panel only, the other 4 3d object wich are cubes or plan rotate to show like cube won't show at all
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,394
    Ahh, good to include it's 3D UI.
    In that case, if you google something like 'unity urp render over everything' you should get results.
    If you already tried, what did you try and what didn't work
     
  5. Rafaat_Ashour

    Rafaat_Ashour

    Joined:
    Sep 25, 2020
    Posts:
    50
    all me search result was almost everyone suggest use another camera, and i did that and make sure that the new camera target only my panel and 4 object and it did work but as i said doing this cut my performance a lot, i see some post said that camera stacking is a high demanding process especially on mobile.

    i found it weird that basic layer order didn't effect on 3d project!
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,394
  7. Rafaat_Ashour

    Rafaat_Ashour

    Joined:
    Sep 25, 2020
    Posts:
    50
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,394
    Then I also can't help much
     
  9. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    Did you try using Renderer Feature RenderObject?
     
  10. Rafaat_Ashour

    Rafaat_Ashour

    Joined:
    Sep 25, 2020
    Posts:
    50
    i fix my issue with camera stacking,

    the performance issue fix by disable post process in the second camera and also remove cinemachineBrain component from it.

    thank's a lot for your help