Layout group and anchors

Hello,

I’m using layout groups nested in other layout groups to design a UI. It looks fine on my resolution, but if I change the aspect ratios, everything looks out of wack:

How I develop: Imgur: The magic of the Internet

5:4 ratio: Imgur: The magic of the Internet

The way I fixed this on different UI elements is to drag the anchors to the 4 corners of the current element. But because I’m using Vertical/Horizontal layout groups, it doesn’t let me manually change the anchors of the children. It seems like I can get a version of the preset anchor positions by changing this dropdown:


But I can’t achieve the same thing as “put the anchors at the 4 corners of the child” from that dropdown. As a result, I can’t get any of the UI to look good on any ratio but the one I develop on.

How do I get the best of both worlds: Layout groups but custom child anchor positions?

If it’s not possible, then how can Layout groups be useful? Seems like they could only look correct in one resolution.

1 Like

Found an answer over here: Layout Group children and their anchors

I still kind of question it. It makes it sound like you should not be using directly nested layout groups?

1 Like