Hello, could anyone please explain how to use Anchor for GUIs to make them look similar on mobile? They are often pushed around and resized on mobile when played (for example, a frame being pushed to the top of the screen when it is in the middle for computer), which can be a very large issue. I have tried to search on Youtube, but almost all videos tell me to download a plugin, which I am trying to avoid if possible.
Thank you for reading this!
well considering all the tutorials need you to install a plugin and you dont want to there is a way to do this.
First off how the plugin works is by putting some stuff into the GUI OBJ.
So what are these things that make it scale on all devices?
First off before we get into that stuff.
Make sure you are using scale and not offset for your GUI stuff.
What is scale? Scale is a value inside of the UDIM2 or the size of the GUI OBJ
Note by GUI OBJ I mean the item you want to scale. If its a frame a textlabel or a button!
How do you change it from scale to offset?
well here is a scale version of size.
Change the size property of the GUI OBJ to this.
also heres a post on UDIM2 so you can understand why to use scale instead of offset.
set the size property to this.
0.5, 0, 0.5, 0
as you can see that the UI has changed size.
If you dont like the size now, play around with the values. Just note keep the 2nd and 4th value 0s at all times!
Another note is you can scale the GUI with the square things that you would normally use.
You have to do it straight from the SIZE property.
Also change the GUI OBJ’s anchorPoint to 0.5,0.5
This way once it scales it scales from the middle of the GUI OBJ.
Now you have to put a UIAspectRatioConstraint into the GUI OBJ.
This way it will scale correctly, I think.
Anyhow I would recommend getting that plugin cause it makes everything easier.
So you dont have to do everything manually.
And hey I use it to and it works!
Also here’s some other things on it.
If this is to complicated then I really would recommend the plugin.
~Froyo~