UI positions not fitting on tablet screen sizes?

I’m trying to have our simulator UI fit on all screen sizes. We are using scale and UIAspectRatioContraints on the square buttons.
What we want to achieve:


What is happening:

You can see that the buttons on the right are separated far away. The Sell button and the other 3 labels showing how much strength, coins, and gems you have don’t have UIAspectRatioContraints in them. (When I do they are all broken on most screen sizes) Mobile, pc, and xbox work completely fine

I’ve tried looking around the developer forum, and for different constraints but nothing seemed to work.

Any help is appreciated!

What do you mean by that? Do you mean they’re not touching the edge of the screen like you’d expect? Are they not as close to each other as they should be? Saying they’re “separated far away” is a bit unclear.

3 Likes

Why not child them to a scale-based parent frame and use a vertical UIListLayout with a set pixel spacing between them?

1 Like

I apologize, what I meant was that they aren’t supposed to be that far apart from each other

Its supposed to look like this
image

And it looks like this
image

This isn’t really a big deal, but you could use a mix of scale and offset if you want them to be an exact number of pixels apart. Just use the first one’s position and size for the scale portion of Y, so that the elements are touching, and adjust it with 1-5 pixels of offset.

This is similar to GGGGG’s suggestion, but you don’t really need to use a UIListLayout for that.

4 Likes