New GUI scaling misunderstanding IOS

I am using the new GUI in 4.6 for the first time and am having problems with button sizes appearing differetnly on IOS devices of smaller resolutions.

On iPads bigger than 1024x768 the buttons appear perfect the same is true on iPhones but on iPad2 at 1024x768 and iPhone4 the buttons appear in the correct position but twice the size?

Here is my setup:

Canvas width 805 height 453 (I am unable to amend these as greyed out?)
Render mode is Screen space overlay
UI scale mode is constant pixel size
scale factor is 1
reference pixels is 100

Button width 128 height 128

Button image width 128 height 128
Texture type is texture
Max size is 128
Format is compressed

Button image on disk is 256 x 256

I have tried all manner of changes and when I am able to get them to appear right on iPad2 and iPhone4 they appear too small on the newer devices

totally confusitcated! can any one help please?

Thanks in advance

Help…anyone?

Don’t use constant pixel size. Try scale with screen size instead.

1 Like

Yes, I always use the canvas scaler set to scale with screen size. The actual size and reference pixels per unit are kind of arbitrary so I just leave them at the defaults of 800x600 and 100. Use match height, which IMO should be the default; not sure why you’d use width. Then change the sizes of the elements so they look the way you want, and use anchors to position them relative to screen corners or screen center as needed. Make sure text and stuff looks crisp at the highest resolution you are going to use, and it will look good scaled down too. Now the UI will automatically work correctly with any screen size and aspect ratio.

–Eric

1 Like

Absolutely. Forgot to mention that.

Thanks guys, I think that has fixed it. The output looks OK in the Game view just need to grab an actual device (during the holidays) to confirm, but looks very promising, will confirm once I get it on a device, thanks again :slight_smile:

Worked a treat, thanks guys :):):slight_smile:

Hi, I have found a small issue and not sure if this is supposed to happen or I’m missing a step?

In landscape the buttons appear great across the devices but when I rotate to portrait the buttons again increase in size but do remain in place.

I would though regardless of orientation the buttons would remain the same size?

Have I missed a crucial step?

In Canvas Scalar,

play around with Match Value (0-width to 1-height), set it as per you need. You may set it to 0.5

1 Like

Thank you Lilboylost :slight_smile: