We updated our project to version 5.1.0 just the other day and the first thing we noted was that our UI wasn’t showing up anymore.
It looks like hierarchical sorting doesn’t apply to nested canvases anymore. Checking the ‘overrideSorting’ flag does bring the ui elements back into view. But we needed to check this flag for every nested canvas we have in the scene which seems silly. And even than we have sorting errors with dynamically enabled elements, even when their parents have a higher sorting order than the parent of the element that is falsely drawn in front instead.
Another thing I noticed is that the game view rendering differs from the scene view rednering in relation to z sorting which makes this even more infuriating.
There are some issues in UI sorting in 5.1 that we are aware of. The UI team are working on this and we hope to have a fix out as a patch. For the moment try disabling sprite packing(if you are using it) or revert back to 5.0.
Hey Karl,
glad to hear it and thanks for the quick response. Can you give an estimate as to when this patch might be ready? (We have a milestone coming up in two weeks…)
Its hard to say how long and if the fix would help, you may have a different issue. I suggest you report it as a bug and then we can investigate - Unity QA: Building quality with passion
Keep an eye on the patch releases to see if they contain UI fixes, if they do try them out.
Are you able to use 5.0 whilst you wait?
I’ve isolated and reported a bug related to sorting in 5.1 (#703250). I’ve got a reply the next day from the QA team that the bug was fixed and will appear in 5.2
But 5.2 is probably several months away, can’t this fix be included in one of the patch releases instead?
I’ve reverted back to 5.0 for now as well… but I was not only seeing the widespread UI Z sorting issues, but the same exact UI scene that runs with 15-17 batches in 5.0 hovers around 40-55 batches in 5.1.
I’m sure it’s directly related to whatever got fumbled on the sprite packing end, but figured I’d chime in with that for what it’s worth.
(edit: I realize this was never claimed to be fixed, but to be clear to anyone else finding this thread, I was using 5.1.0 and 5.1.0p1 and seeing all glitches in both before I punted and downgraded. Wouldn’t consider either of those releases ready for show-time from the UI side.)
Thanks for the head’s up. Good I wasted my morning banging my head on this, seeing how we knowingly pushed a release out the door that had non-trivial and fully documented bugs during beta.
Chipping in here, I thought I had fixed this but to no avail. My entire app is currently canvases with UI elements (mostly buttons and input boxes) and on button presses there is a horrible flicker with what looks like some kind of garbage from a buffer flickering on the screen and all UI elements dissapear.
As 5.1 fixes some issues for some devices but breaks it for others… I am now needing to have 2 versions of unity and doing 2 releases of everything until it’s sorted. A patch would be greatly appreciated before 5.2 which, as someone mentioned, is probably months away.
Hey all;
Just started work on a UI-heavy prototype - apologies if this isn’t the right place to put this, but something that helped me keep multiple canvases behaving correctly was to child those canvases to panels, with the panels having the “Mask” component added.
For my work, I had two “viewports” that could be located anywhere, but contained multiple panels/elements underneath a parent canvas (for panning and scrolling) - so by making this “clipper” panel the parent, I could still manipulate the canvas underneath it, but only “saw” what the clipper panel allowed through.
I wasn’t able to confirm if in the Scene Editor if they’re still stacking on top of one another (it seems to be bugged, I actually can only see my UI in my Game window)