So my UI looks like this in studio:
but when i open the emulator it looks like this:
There is no offset values in the scale or position as well.
Also I have tried to look into UiAspectRatio but have found no luck
Here is my UI:
UI Help.rbxl (29.2 KB)
That’s because in studio your resolution is slightly smaller, to see how it would look like in-game when you’re in studio, do the following:
Click the device icon top right, change the device dimensions to whatever device you’re currently using and instead of “fit to window” use “actual resolution”, that’ll show you how the UI will appear in your game.
It’s also recommended to design UI using scale, since then it will scale down/up according to the resolution of the native user’s device (smaller for phones, larger for computers etc.).
1 Like
Thanks, this worked for everything except for the textbutton. I tested on a different device and it doesn’t have the same position relative to the rest of the ui compared to when it was on pc resolution
No problem, and I’d recommend resizing that text button using the scale components of UDim2 values.
UDim2.new(scaleX, offsetX, scaleY, offsetY)
I did (ignore this:aosdfhaslk;djgliadsglkfjs)
It seems like the only thing that isn’t adjusting is the textlabes and text buttons. They do not adjust relative to everything else. It is just them.
Make sure they’re inside of the Frame instance. You’ll also need to negate the size of them from the position.
So if the size is UDim2.new(0, 200, 0, 100) for example, the position will need to be:
UDim2.new(scaleX, -100, 0, -50) to accommodate for its size.
yes they are
Edit: Also what do you mean by
Use AutoScale Plugin: [Plugin] AutoScale Lite for GUIs - Scale your UI
All i do with is that i select every descendants and convert them all into Scale (Position & Size).
Making descendants fits for every devices in a frame that covers the entire screen, you can use UIAspectRatioConstraint.
1 Like
I’d avoid using plugins, while it may make life easier it takes away from the aspect of self-made work.
I will use it as it is the only thing that might be a solution, but until i figure out how to do it without a plugin, im gonna try this
Essentially subtract half the offset size from the offset position of the UI instance.
A lot of developers uses this plugin and it’s better to make life & development easier than wasting a bunch of time trying to fix a simple gui scale problem, it’s quick and you can use it anytime.
1 Like
I provided a way above, you may have missed it since I edited the post.
Put everything on scale, not offset, and use AutoScale to do so, autoscale also offers good UIconstraints so also use them on most of the object, textsize constraints are a thing too if you know how to manage them, or get autoscale pro
1 Like
He has everything set to scale already, I already provided that answer several replies ago. In fact it was the first reply to this thread.
Then use AutoScale to insert UIconstraints in most of the UI, what I like to do is add them everywhere, though I’m not sure it’s necessary
Definitely not and will cause your StarterGui to become cluttered with unnecessary instances.
I dont get what you mean, offset on all my ui instances are all 0 on position and scale, i can’t half them. Also I have said this numerous times, in my original post and replies
Are you sizing UI instances using scale or offset?