Lining up the boundaries of an element with a UIAspectRatioConstraint

Hello, This issue has bugged me for the longest time, but I can never find a solution to it. The problem is that the boundaries of two UI elements (the blue outline in the image) can’t align perfect whenever one of the elements have a UIAspectRatioConstraint. This issue worsens whenever you test it out at different screen sizes, because they can either get squished together or separated further.

image

I want to know if there is a fix for this that works on ALL screen sizes, not just the usual 16:9. Any help is appreciated.

1 Like

Have you tried plugins like AutoScale and stuff like that? I heard those really help for comparability and devices.

1 Like

The problem is that when using scale, it scales proportionally to the element above it, but it is unable to scale to align with the boundaries of other elements. And again, even using those plugins and using scale and stuff, it still wont scale proportionally to the boundary, so you end up getting UI that looks like this on other screen sizes.

image

the easiest solution (and the one i would do), is to just add a UIAspectRatioConstraint to the big parent frame.

from the image, it looks like your working on a Settings frame, just add a UIAspectRatioConstraint to that (preferably using a plugin, and while on a viewport size that makes it look good), and the UI objects inside of it (such as this dropdown button your working on) will not morph and stretch, leaving you with no worries of it misaligning.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.