Search Unity

Unity UI Wrong sort layer UI element

Discussion in 'UGUI & TextMesh Pro' started by tnbao91, Dec 10, 2017.

  1. tnbao91

    tnbao91

    Joined:
    Sep 5, 2013
    Posts:
    46
    I have 2 UI object are PopupOverlay and MessagePopup. Problem is PopupOverlay was behind MessagePopup in Hierarchy, but it always show in front of PopupOverlay

    Screenshot of this issue


    and this is what I want
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    I see the diff in your screenshots, but the hierarchy looks the same or I am losing my head a little? :)
    Whatever is higher up in the hierachy should be behind.
     
  3. baotnxct

    baotnxct

    Joined:
    Aug 31, 2017
    Posts:
    1
    The first is my issue; the second is what exactly I want. In the first screenshot, you see PopupOverLay object is higher MessagePopup, but it shows in front of MessagePopup. So weird
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Is it a camera space canvas? That can be affected by the z-position..