I still remember that weekend, about five years ago...
I spent the entire weekend worried about all the technical debt I was accumulating over the months in one of my projects. I had done things too quickly, without really understanding them. Clearly enough, that had to stop working at some point.
The thing is, I owed my clients results but I had no idea how to bring them. That morning though, I said to myself: Rubén, this is enough. Stop the excuses. You are becoming a professional today.
So, I decided to gather every single resource I could find about user interfaces in Unity, because that was the biggest hurdle I was dealing with for several weeks. I read forums, best practices, Unite videos, read all blogs I could find on that topic and did my own research.
Did you ever experience this feeling of slowly getting overwhelmed by technical debt? It accumulates over time and someday you either give up or decide to crush it. In my case, it was the later.
You probably heard that optimizing UI in Unity is challenging. Or, if lucky, you know it from first-hand experience. Yes, Unity UI is a powerful tool and I love it. However, its mightiness can quickly transform into a deadly weapon if it falls into inexperienced hands. And so were my hands back then.
If I had to confess anything to you today, it would be this: I wished I had had a solid foundation on Unity UI before I designed the UI of several games.
It is SO easy to do it wrong, SO easy to get frustrated. In my opinion, there's something even easier than that. That is, for your client to ask you to do over-hours to get your shit together.
In my experience in the professional sector, companies do not want developers who design poorly optimizable interfaces and leave the tuning task to experienced programmers. They rather want developers who create visually stunning interfaces, but also performant.
And even in the indie development scene, where would you choose to spend your time on? Bringing fun to your players, or spending hours clicking through the profiler to find bottlenecks?
In my opinion: no matter your role, you should understand basic Unity UI design principles. But this takes time and project experience. You might not have any of these.
Hopefully, I can help you there.
Today, I will give you one of my most powerful tools:
The Guru's UI Development Diagram
As usual, I'd like to start with the Level 1 Developer construct
Level 1 Unity UI Developer: UpdateBatches & Layout Spikes in Unity UI
Level 1 Unity UI Developer: free-style UI
This is where we all start: free-style design, free-style results.
I used to import sprites with whatever settings. Then, I would add them as images everywhere with no predefined criteria. And so I ended up with an unstructured hierarchy full of components that I didn't need. I used the wrong systems for the wrong reasons.
Overlapping UI elements, a motherload of batches, profiler spikes. Those are all common.
Do I have anything against this?
Partially. I think it is great to play around and to make mistakes. Breaking and repairing help learning.
But if you want to do this for a living, at some point you might want to level up your skills and embrace professionalism.
This becomes unacceptable in the games industry, especially in Virtual Reality. If you do this in VR you will turn players into patients.
Such a chaotic Canvas hierarchy structure could look like this:
Level 1 Unity UI Developer: Unstructured Unity UI Hierarchy