- Home /
Question by
oliver-jones · Feb 19, 2012 at 07:04 AM ·
guisizefontincrease
Change GUI Font Size Dynamically?
Hello,
I have a GUI label in my OnGUI function, and I want to be able to increase the size of the font within my script. Like so:
var fontSize : int = 20;
function OnGUI(){
GUI.Label(100,30,0,0),"WAVE ONE!", ?fontSize?);
fontSize++;
}
Thus causing the font size to grow over fps... How would I achieve something like this?
Comment
Best Answer
Answer by Eric5h5 · Feb 19, 2012 at 08:56 AM
GUIStyle.fontSize, only for dynamic fonts. (You can't use fontSize++ in OnGUI like that, though, it will be framerate-dependent.)
Your answer
Follow this Question
Related Questions
GUIBox fontSize without changing other labels? 3 Answers
Changing a GUILabel text SIZE 3 Answers
gui button vary font size 1 Answer
How to set the font size in GUI.Label 2 Answers