Resizing a UI properly

Hello, I am attempting to make My UI’s size properly, I have achieved a somewhat solution to my problem, but if I resize my screen to be smaller then it starts to move out of position, I am not exactly sure why that is but an explanation and solution to my problem would be very appreciated!

2 Likes

Try using Anchor Points. They help keep things in place.

3 Likes

updated post, I already am using anchor points though

For this effect I believe that they used a UISizeConstraint.
You can learn more about UISizeConstraints : UISizeConstraint
image
By using the constraint, you can change the minimum size and/or maximum of the UI so it doesn’t go under/over that amount even when changing the size of the screen.

You can also maintain the Aspect Ratio by adding in a constraint. Specifically, UIAspectRatioConstraint
By doing this you can maintain the sizing of your UI and get that scaling effect you wanted.

Also keep in mind that you should have your Position in Scale and set your anchor point because this will allow your UI to stay where you want it, but also change depending on the size of the screen.

1 Like

I had this same problem, but the nice guy helped me Fix it :slight_smile: (coolkingll)

2 Likes