What do you think of this UI hierachy?

I was recently playing with UI, layout elements, group, fitters, etc. Because I want my in-game store menu to be adjusted to any kind of ratio (especially on mobile).
So I finally came up with a decent solution which works fine on different ratios.

I added a layout group inside a panel then, one of these groups element is a “frame” (empty gameobject) inside that “frame” I have another layout group inside another panel.

Then, I start doubting myself if this ui hierarchy / structure is that good.

I have been told that only playing with the layout element should be enough to keep my ui elements in place in different ratios, but did not work.

Here a quick mock up of what I did.


Here the final hierachy
6186403--678079--hierachy.png

But something is bothering me by having too much “panels” and "frames.”
Sometimes I ended up to add another panel because there’s a background image.

Is this a good solution to handle different ratios for UI?
What do you think?

Thank you

hmm what is it that you want to achieve? is it just about the ui scaling? if so the canvasscaler does this job.

edit: i use unitys ui system (which is shit) the last four years. everytime i used a component from unitys auto layout stuff, it turned out to be bad in some way. if you get it to work after days of playing around, the performance will suck on mobile. maybe i did it wrong all the years.

if you manage to get a working ui (with ratio and all the stuff). always test out the fps on mobile and profile it afterwards.
it is almost always better to just use the anchors of the recttransform and be as flat as possible.
see the horizontalpanel / verticalpanel etc as a layout helper and disable it afterwards.

ive implemented complex ui designs basically for the last 17 years. and unitys ui is … not good