Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I reposition a GUI so it's the same across all devices?

Asked by
birds3345 177
4 years ago

So, I have a GUI in my game, but it looks different whenever I try it on another device. I tried using a "UIAspectRatioConstraint", but I realized that it was only for scaling..... Can someone help me with this? And is there a way to do it without using code, and if there isn't can you tell me how to do it with code, because right now I'm really stuck....

1 answer

Log in to vote
0
Answered by
sheepposu 561 Moderation Voter
4 years ago

You need ot use the Scale X and Scale Y positions. The position on a aGUi looks like this "{0, 0}, {0, 0}" Correct? Use the first number (decimal). It will scale is based on the screen size. Also do the same thing for GUI Size. When using text in GUI's make sure to Scale it, or it could go off the label on a different screen. Hope this helps!

0
I aready tried that, it didn't work, infact I have then scalled right now but thanks for trying to help :D birds3345 177 — 4y
0
What do you mean by "look different", if you are on different devices using the scale, it should look different as in rescale itself to fit the screen. sheepposu 561 — 4y
Ad

Answer this question