Using UIGridLayout, How Do I Make UI that is Compatible on all devices?

So, as a developer, I feel that making UI for all devices is very tricky. I tried many ways, like setting the UI to relative YY or something, but the problem is, that, I use UI constraints. I even tried some math, but I guess it doesn’t work( I tried using a script that detects the absolute x-axis size and make that the y-axis size)

How would I be able to go around this?

On PC:

On Phone:

Capture

All help is appreciated

Make sure your UIGridLayout’s cell size is using scale. After this, you can simply place a UIAspectRatioConstraint object inside of your UIGridLayout and set the aspect ratio to 1, this will ensure all the frames are square.

2 Likes

It makes it square, but then this happens:

Normal:
Capture

Mobile:
Capture

I tried using different constraints and this is still present