Is there ANYWHERE on the internet which gives a reasonable overview of the Unity UI layout components in such a manner that you can then claim to understand them.
This 5-part series is the best I’ve found. The presenter does a great job, but still there are loads of cases (look at setting the pivot point of the content in video 4) where it’s just a case of “hmm, that’s weird, enter play mode and exit again and it’ll hopefully be in the right place now.”
The official Unity UI tutorials consist of the original “Learn” tutorial which is way out of date, and the “Runtime shop scroll lists” tutorial, where the presenter gamely tries to explain everything whilst explaining “Hmm, and the contentsizefitter… well, that’s weird, well, the viewport seems to have reset itself, well, hmm, try again and, not sure why that’s like that now, oh look, here we go…”
The official docs are like some sort of opaque text, image-free, example-free mess.
Reading and tinkering the source code might shine some light on it, but hands up if you’ve managed to debug an externally built and modified UI dll ![]()
Utterly, utterly ridiculous side note: I actually built one of the highest grossing colouring apps (currently top-40 grossing in Entertainment category, ios USA) on ios/Android for a thirdparty publisher using Unity UI, and I still do not get how it works! Yes, seriously. I STILL don’t understand how Layouts and ContentSizeFitters work, even the thing that I eventually built, including exactly the type of grid layouts and grids-with-text-above-them and scrolling that I want to recreate today AND UNDERSTAND.
All I can tell you is that I spent days faffing around with stretches and contentsizefitters and verticalayoutgroups and stuff, and watching layoutelements randomly decide to collapse to size zero, and relying on my version control system to revert the scene whenever anything stuffs up because it didn’t seem possible to rely on Undo with the UI layout system, and when I finally had a scene that seemed work, I never touched it again.
Unity UI works great when you want to make a pause menu with a couple of buttons and a volume slider, but there are clearly LOTS of apps with “app-level” complex UI being built with Unity UI these days. What I don’t understand, is are all those app authors just faffing around with things until it seems to work like I did, or is there actually some repository of knowledge out there. I’m sure there IS logic in the UI somewhere (you could theoretically derive it by reading the source code, although running with a modified version of it to test your theory is an adventure in iself…) but I haven’t been able to fathom it. And just in case that sounds too n00b, remember I’ve probably built more complex UIs with Unity UI over the last 24 months than 99.99% of unity developers (including, I note, any of the official Unity UI examples I’ve found) so my ignorance is based on clearly-understood frustrated feeling of ignorance, not lack of effort.