Unity3D 处理Label的颜色代码

UILabel m_name = transform.Find("Name").GetComponent<UILabel>();
m_name.text = GetNameColor(name,1); string GetNameColor(string name , int quality)
{
string str;
switch(quality)
{
case 1:
str = "[ffffff]" + name + [-];
break;
case 2:
str = "[00ff00]" + name + [-];
break;
case 3:
str = "[66ccff]" + name + [-];
break;
case 4:
str = "[ff00ff]" + name + [-];
break;
case 5:
str = "[ffa500]" + name + [-];
break;
default:
str = "";
break;
}
return str;
}
上一篇:在Docker容器中运行Spring Boot的jar包 jar外的配置文件无法生效


下一篇:循环读取文件夹中的图片matlab代码