- Home /
Text size not getting bigger in mobile phone
Hello everyone,
I'm making a simple menu for an Android game with a script. So I create a GUI Skin and the buttons in the script and I customize the buttons through the inspector.
The thing is, no matter the font I pick is setted to dynamic or unicode, and I change the font size from the font Import Settings or from the Gui Style, there's a point when the size won't grow. It grows in the Unity editor, but when I check on the mobile it looks always the same size. So I can make it smaller but not bigger.
I would really appreciate some help. I'm working with Unity 4.6
Answer by black843 · Nov 29, 2014 at 06:48 PM
once I had the same problem. I figured it out by using guistyles.Now all textsizes are calculated by the Screen.width and Screen.height. Just write the following code!
float fontsizeHeight = Screen.height / 100; (int)fontsizeH = fontsizeHeight;
guistyleName.fontsize = fontsizeH;
That's all. Good Luck!
You're right, just doing this I get the problem solved. The thing is, I don't have the same scale in the editor and in the mobile phone, so all gets smaller in the mobile. I had everything scaled by screen size (buttons, images...) but not the text, so it displayed badly.
Thank you!!