Search Unity

Question UI Item Render Order

Discussion in 'UGUI & TextMesh Pro' started by gavinb80, Sep 15, 2020.

  1. gavinb80

    gavinb80

    Joined:
    Nov 4, 2012
    Posts:
    98
    Hi all,

    I have a panel at the bottom of my screen with a few UI images in it.

    The first image in the horizontal layout is draggable by the user, my problem is that before it is top in the list of images, it is rendered first and therefore when it is dragged it is behind the 3 other images.

    I know that ui elements are rendered from top to bottom in UI tree, so I could move the image to the bottom and therefore it would be on top, but then it would be on the right hand side of the panel and not the left.

    I’ve tried change the z position which works in the editor but not at runtime.

    Is there anyway of changing the render order of a single panel with an horizontal layout, or do I just have to accept that I need to move the image to the bottom of the list (and therefore right hand side of the panel ).

    Thanks in advance
    Gavin
     
  2. gavinb80

    gavinb80

    Joined:
    Nov 4, 2012
    Posts:
    98
    I've found the Bi directional horizontal layout asset on the store, this seems fairly light weight and gives me the results I need