I’m trying to build a simple custom skin. I need to be able to display large texts, and with a font larger than the standard font size. However, for some reason, whenever I enable word wrap, it removes the effect of the font size.
Has anyone else experienced this? Any work arounds?
For what its worth, I’m using Unity 3. I’ve included a real quick demo of a scene demonstrating the issue.
So, I was able to get wordwrap and font styles to work properly by explicitly setting the Font in the custom style I was using. Seems strange it couldn’t do this with just the default font, but at least there is a work around that exists.
But this has introduced a new, minor problem. When I set the custom style font to my new font, and the main GUISkin font to the default and I get a warning as follows
And the text areas go blank.
This happens even if I explicitly set the font back to the default fonts. Looks like this will force me to use my own custom font (which isn’t a big deal).
Yes, it is very odd that it doesn’t work with the default font.
In order for wordWrap and fontsize to work correctly, you need to set the Font in the GUIStyle, even thought it maybe the same as default font in the GUIStyle.
I guess if we choose to use the default font and don’t define the font in the style, when wordWrap is enabled, it uses the default font size as well. It disregard the font size we set. We need to bare that in mind.