Way back when only nomadic gangs of primitive programmers like myself roamed the earth, and mobile devices were just crawling out of the primordial ooze to wrap around the brainstems of unsuspecting humans, Unity had immediate mode GUI, driving both games and the editor.
Lo, it was glorious and the God of Programming did look down upon our projects and our repositories and our simple text editors and smile. One could do everything with a few lines of code: make a rect, set a style, call an API, draw a texture, some text… done.
Some of us less-evolved primitive programmers dubbed this the “Golden Era of Actually Shipping The Game.”
But the God of Art and the God of Design looked down with dismay and said 'We do not want to make rects and call APIs, we don’t have that kind of desire to inflict self torture… SAVE OUR PEOPLE!"
“And besides, you programmers make TERRIBLE-LOOKING UI/UX!!”
And the God of Unity did spake, and around about the Year 2014 of our Unity, in Chapters 4 dot 6, did the waters part and forth came the all-new UnityEngine.UI module.
And yea did the primitive types like myself gnash their teeth and rend their keyboards asunder! Their cries rose up through the heavens, beseeching the Gods… “Why must we touch our mouse? Surely we have not been so wicked in thine eyes?”
After four score and twenty patches and hacks and tutorials and teeth gnashing, we primitive programmers came to learn and grudgingly tolerate the UGUI.
But no matter how much we adapted to UGUI, 100% of the Unity Editor (scripts, windows, inspectors) and everything still uses the IMGUI system, with good old GUI and GUILayout still powering every single millisecond, every click, every graphic, every button, every piece of text in the ENTIRE UNITY EDITOR.
If you want to be a serious Unity programmer, you MUST write editor scripts… so you must remember how to use IMGUI/OnGUI anyway.
Now this is where my history gets a bit fuzzy, but I think UIToolkit is an attempt to unify all this into a single web-friendly designer-friendly system, able to power your game AND write editor tools.
Well, not sure where it is at… but it still has a ways to go! Even their own site says to use UGUI:
I quote:
“Although Unity recommends using UI Toolkit for some new UI development projects, it’s still missing features found in Unity UI (uGUI) and IMGUI. These older systems are more appropriate for certain use cases, and are required to support deprecated projects.”