GUIStyle fontStyle = new GUIStyle(); //设置字体变量
fontStyle.normal.textColor = new Color(R,G,B); //设置字体颜色
fontStyle.fontSize = 100; //字体大小
GUI.Label(new Rect(Posx,Posy,Weight,Height), "hello" , fontStyle); //显示文本
// 注意,代码只能写在OnGUI函数里用
---------------------
作者:四月的小白
来源:CSDN
原文:https://blog.csdn.net/LittleWhiteLv/article/details/83000119?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!