- Home /
Problems with render priority in UI Canvas
Gif: https://i.gyazo.com/6815f57be96083f12b7501486674810d.gif
[preview of external content removed for GDPR compliance as it was including 3rd party cookies]
As you can see on the GIF, I'm having problems with the render order. I have an interactable button that needs to be seen (obviously :p) but a lot of other sprites have more render priority. I have no idea what's happening. I have tried with layers and Z positions. But nothing helped.
Other info Unity version: 2018.2.3f (but this happened me with older versions)
All the sprites (except from the blue map in the background) are inside a Canvas. This canvas is in "Screen Space - Camera" render mode. In other render modes this problem happens too. Is a 2D game and the camera is in orthografic view
Thank you
Answer by IvovdMarel · Aug 12, 2018 at 01:00 PM
The render order of UI elements should (almost) never be done by z-sorting. Instead, you should change the order of the objects in your hierarchy view. The lower the object in the hierarchy, the later it will be rendered (so the opposite of Photoshop Layers)
But what if I have popup as a child of top element? it is rendered under bottom element...
Answer by cachodragon · Aug 12, 2018 at 01:21 PM
I tried too. But it doesn't work. I have tried to change the order in the hierarchy, but I haven't seen any change.
Your answer
Follow this Question
Related Questions
Changing button positions on different resolutions 1 Answer
UI Button onclick not detected 0 Answers
How to make a button animation in menu 1 Answer
UI Button and character actions 1 Answer