如何设置GUI.button的透明度
【自定义button按钮图案,未发现设置透明度选项】【代码如下,红色为生成button代码,查找API只有三个参数可以设置】
var Screenwidth:int;
var Screenheight:int;
var count=0;
var obj:GameObject;
var mySkin:GUISkin;
Screenwidth=Screen.width;
Screenheight=Screen.height;
function OnGUI () {
GUI.skin=mySkin;
GUI.backgroundColor=Color.gray;
if(GUI.Button(Rect(Screenwidth*0.8,Screenheight*0.72,100,100),"","start"))
{
Application.LoadLevel(1);
}
if(GUI.Button(Rect(Screenwidth*0.7,Screenheight*0.8,50,50),"","achievement"))
{
Application.LoadLevel(2);
}
if(GUI.Button(Rect(Screenwidth*0.93,Screenheight*0.14,30,30),"","setting"))
{
Application.LoadLevel(3);
}
if(GUI.Button(Rect(Screenwidth*0.93,Screenheight*0.03,30,30),"","quit"))
{
Application.Quit();
}
}
【button呈现半透明,就像系统默认的button一样】
大作业,快要交了,求大神指点啊!!!!!
页:
[1]