UI not positioning properly when using UIAspectRatioConstraint


I have a leaderboard UI which works for the most part, however when a player has a wide device, it detaches from the top right corner which is super unappealing.

I have some aspect ratio constraints which seems to be causing the issue. How would I go about this?
Keep in mind that I am using scale entirely, no offset at all.

Constraint properties:
Screen Shot 2020-07-28 at 4.12.51 PM

How it should appear (appears correctly on my computer):
Screen Shot 2020-07-28 at 4.07.06 PM

How it appears when a wide device is used (note the entire right side):
Screen Shot 2020-07-28 at 4.07.29 PM

You can use AnchorPoints and set them to the right of the UI elements to make them stay in that place and expand elsewhere. Simply set the property to (1, 0).


Thank you so much, I felt like an idiot when you commented that. I saw the property but it didn’t clue in that that is what it did.

1 Like