1 //定义一个GUIStyle的对象 2 GUISytle labelFont = new GUIStyle(); 3 4 //设置文本颜色 5 labelFont.normal.textColor = new Color(1, 0, 0); 6 7 //设置字体大小 8 labelFont.fontSize = 10; 9 10 GUI.Label(new Rect(0, 0, 0, 0), "text", labelFont);
1 //定义一个GUIStyle的对象 2 GUISytle labelFont = new GUIStyle(); 3 4 //设置文本颜色 5 labelFont.normal.textColor = new Color(1, 0, 0); 6 7 //设置字体大小 8 labelFont.fontSize = 10; 9 10 GUI.Label(new Rect(0, 0, 0, 0), "text", labelFont);
转载于:https://www.cnblogs.com/Clover-Z/archive/2013/06/07/3124164.html