how to set the alpha of GUI

how to set the alpha of GUI as Default,for examlpes:alpha of button!

1 Answer

1

You can use the GUI.color property to set the alpha of the global GUI render. A solution to your problem could be:

Color tmpColor = GUI.color;
GUI.color = new Color(1,1,1,0.5f);
GUILayout.Button("Alpha button");
GUI.color = tmpColor;

great!!thk you very much,i am a beginer from China ,my English is so bad,i am glad you can understand me!!

Great answer. Nice, short and clear =)