I recently upgraded my long-running project from Unity 2020.3.34f1 to 2021.3.6f1.
After figuring out a couple of small and unrelated issue, I ran into problems with the UI that I seemingly can’t figure out.
The game’s UI is based on a single Canvas (Screen Space - Overlay) GameObject hierarchy that had no issues in Unity 2020.3. After the upgrade to 2021.3, the drawing order of Canvas object becomes severely broken after changing the hierarchy. The issue appears both in the Editor and on mobile devices.
After tapping around a couple of times (where GameObjects with their own Canvas components are enabled or disabled, or popup-like Prefabs are instantiated or destroyed), the Canvas’ hierarchy seems to have no correlation to the game object hierarchy anymore - stuff is unexplicably drawn on top of each other in the wrong order. I haven’t ever touched sorting layers or anything else, it was all working fine just based on the GameObjects’ hierarchy. Similarly, when the drawing order is broken, input events either pass through objects or are not received by top-most objects anymore.
None of this has happened before the upgrade to 2021.3, and I’m not sure even where to start looking.
Has anyone encountered something similar before? I’d be super grateful about any hint, thanks in advance.
Thanks for the note! That definitely is useful in the meantime while the actual bug is fixed.
I believe the default behavior for canvases is that the order is defined by the hierarchy, which in my case is very important. Needing to set sorting override for every canvas is kinda a stop-gap solution. IMHO, anyway.
What I see in our project after upgrading from 2021.3.5f1 to 2021.3.6f1 is that the input system gets confused. Elements are drawn in the correct order. There are no visual clue something is off. However, after interacting with the elements, showing/hiding different in-game screens, the UI eventually stops responding to hovers and clicks. Playing with this in the editor, I discovered that some of the canvases that were drawn in the back are in fact blocking/eating the mouse/touch input.
Overriding the sorting order has a positive impact but I’m not sure it is a complete fix and anyway there is too much unknown on what else got messed up in the UI to continue with 2021.3.6.
Too bad, I really needed those Android crash fixes :-/
How are these issues slipping past QA and being introduced into LTS builds? What a joke. Guess that’s what we get when Unity can’t even make a game in their own engine and cans the developers behind it.
Confirmed this update broke all of my UI by upgrading to 2021.3.6f1, from 2021.3.1f1, Windows10. Can’t run my game in playmode/builds since none of my UI responds.
Needed to upgrade to 6f1 to try and find a fix for other previously broken features coming out in the earlier 2021.3.1f1, such as builds no longer targeting your main monitor, which is another unacceptable bug.
EDIT: Note my issues seems somewhat different than other’s being reported.
I do generally use gameobject.setActive to control what parts of my UI show up, and at this point I can see all of the UI I expect to see. I just can’t interact with any of it. No mouse hover, no mouse click, so I can’t get past my main menu at the start to even evaluate the rest of my UI.
I have filed a bug as well.
Based on some limited testing I can confirm this worked to fixed my main menu, which was a sequence of canvases for each menu stage with visibility controlled via gameobject.SetActive.
I luckily was using a common ShowView() method where I activated all of my canvas game objects, so added this line of code and now my UI is interactable again.
New Unity 2021 version released. Happy to see it in the patch notes. Not happy to see it in the “known issues” section. Baffling. Between this and the countless other areas where Unity is falling behind or literally making its engine worse, I’m definitely advocating against Unity for future projects at our studio.
Unity please ;_; I wanted to release an update to my game but sadly updated to this version and am afraid to downgrade as it usually causes problems even with smaller releases like that.
Don’t they have quality assurance, especially for lts releases?
Sometimes (Right now) I wish everything was still Unity 5. It was fast, looked great with colorful icons and nice shading, didnt have the overcomplicated package system, didnt require you to install a unity launcher, had the asset store built in and didnt have 3 render pipelines and 5 releases that they had to maintain at once, which probably leads to bugs like this
Every update fixes something critical but then breaks another thing that is also critical to the project. They’ve been backporting some of the new bugs to 2020LTS as well. They aren’t doing even basic QA for new releases; it seems.
The scheduled releases are worthless when they don’t contribute to stability. Major known issues are persisting for multiple minor versions of LTS. What’s going on? Are the teams not yet familiar with the new bug reporting system? Or is QA dealing with a huge backlog due to migration to another service? Something has changed recently.