How do i fix the UI stretching when in actual game?

Hello. On my loading screen the image in the middle stretches whenever you play the actual game. In studio it looks fine. The UI is scaled correctly using scale not offset. I’ve tried using UIAspectConstraint and UISizeConstraint and in those cases it just uncenters itself from the screen.


image

Is there a way to make sure its the same size and same position on ALL devices?

1 Like

Use UI constraints to fix this issue :+1:

1 Like

It maybe uncenters if you use UI padding

I believe this is what you’re looking for.

1 Like

There are numerous ways to do this, including changing the anchorPoint to 0.5, 0.5 to keep the ui center while using constraints, or you can change the image scaleType to another value if the issue is imagelabels/buttons ratio size being off. If it’s just an image I personally would change scaleType, but if it’s another object, (I.E. frames, textLabels, E.T.C.) I would simply change the anchor point and position to match the old location along with adding a constraint.

1 Like

Set the imagescale property to Fit.

Since you say it looks fine in studio, simplest way is to add
image
It keeps the same aspect ratio you see on studio.