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:
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.
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.
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.