void OnGUI()
{
GUIStyle style = new GUIStyle(); //实例化一个新的GUIStyle,名称为style ,后期使用
style.fontSize = 50; //字体的大小设置数值越大,字越大,默认颜色为黑色
style.normal.textColor=new Color(0,2,4); //设置文本的颜色为 新的颜色(0,0,0)修改值-代表不同的颜色,值为整数 我个人觉得有点像RGB的感觉
GUI.Label(new Rect(10, 10, 200, 20), "test",style);
}

相关文章:

  • 2021-11-30
  • 2021-11-09
  • 2021-09-27
  • 2021-12-31
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
相关资源
相似解决方案