Gui stretching and squeezing issue

I have an inventory UI that has everything set to scale meaning that It will be the same across all devices. You’d think that but it doesn’t quite work like that :confused:

I tried using XX and YY as the aspect ratio but it still gets a wonky weird result. Literally every single game dev has somehow figured this out and I still can’t figure it out. I’ve looked at about every video on youtube and every article here and can’t figure it out. Can anyone help me with this issue?

1 Like

Have you tried not using the 2nd number at all for no offset between devices?

Ex: Size of (.4,0), (.2,0)

Like I said that doesn’t work, It just makes it a wonky size

Once you use the first number instead of the second, you can resize it using the little points on the end of each and it will change the first. The points on the end of the GUI only resizes the value of whichever you are using. Use (X,0) (Y,0) then resize using the points on the end of the GUI is what I find useful.

Use a UIAspectRatioConstraint for the frame! That way the the frame will grow and shrink proportionally on all devices and the slots will retain their square shapes.

1 Like

I believe I had this issue when starting out before, could you post pictures of the properties so we could take a better look?

I’m getting this is a problem with scale and offset though, you want to make sure you are always using the first number (scale) instead of offset when working on UI for multiple devices. I’ve included some pictures of UI I’ve made before try taking a look and see if you can spot anything that might cause the issue.

Didn’t know that existed! Thanks!

1 Like