So i’ve been struggling with some errors in another thread, Invalid AABB errors - Unity Engine - Unity Discussions
we’ve finally found the exact cause of the errors, with help from the wonderful @DonLoquacious
The issue was the Override Sorting setting being checked on several subcanvases
To be clear, by subcanvas i mean a canvas which is a child, (directly or not) of the main top-level canvas. Every UI Element has to be under at least one canvas.
Unchecking Override Sorting caused the errors to go away, however this creates a new problem. The entire content of the canvas turns invisible. With farther poking around, i was able to fix this new problem by simply removing the “Canvas” component from those subcanvases.
Now it works perfectly, but they’re also not canvases anymore. Now they’re just empty gameobjects with some children. And aside from not being broken, i can’t discern any functional changes to their behaviour
I’m not sure what to make of this. This experience indicates that sub-canvases just don’t work. And i would like some more feedback on this. Is there any reason to use a subcanvas, rather than just an empty gameobject, or another UI element?
What does a canvas even do if it’s not the root? What functionality can it provide.?
My other related question is about the Override Sorting setting. I’ve done my best to comb through the unity documentation, and i can’t seem to find any useful information about what this setting does.
Can anyone write me a brief overview of how UI sorting actually works? And how might the OverrideSorting setting change that behaviour ? What situations are there where using it would be appropriate?
And perhaps most importantly, how or why could the lack of that setting cause my canvas content to be invisible?
That’s a lot of questions, chip in any information you might have <3