Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Question How do you sort without using hierarchies?

Discussion in 'UGUI & TextMesh Pro' started by SgerbwdGwyn, Feb 10, 2021.

  1. SgerbwdGwyn


    Dec 2, 2013
    (With 2021.1.1.0b1, URP)

    I have a canvas and elements populating that canvas, ordered and parented based on how they need to be aligned. I also have Image elements that should always be draw on top, or at least on top of most things.

    How do you sort canvas UI elements? After reading countless forum posts and documentation, the only way to sort them is by reordering them in the hierarchy, which conflicts completely with the hierarchy being used to align elements.

    Things I've tried:
    • Sorting Groups: Does nothing
    • Sprite Renderers: Don't seem to function with Canvas Renderers or canvases at all; they simply don't appear.
    • Multiple canvases with different sorting orders: Breaks up the hierarchies
    • Changing Z position on Rect Transform components: Does nothing
    How am I meant to do it?
    ShadowAngel likes this.