Using a GuiTexture with GUI.DrawTexture

I’ve been trying for hours to get a GUI system working. I’m trying to make a translucent popup at my “shop” on my game. I’m using GUI.DrawTexture to show an image for the background. I want to make it transparent. Is there an easy way to make it transparent or to use a GUITexture (which I Can then make it transparent)?

There are two solutions of your question. The first is to make a texture the transparent with alpha required to you the channel. And the second is to set in color for GUI an alpha the channel less than 1. For example(write on CSharp):

 public Texture2D mytex = null; // your texture with alpha = 1

 void OnGUI() {
  //Sets new color, base of white, with alpha = 0.5f
  GUI.color = new Color(1.0f, 1.0f, 1.0f, 0.5f);
  //Draw our texture
  GUI.DrawTexture(new Rect(0, 0, 200, 200), mytex, ScaleMode.StretchToFill);
  //Return color in white
  GUI.color = Color.white;
  //maybe, other code
 }

I hope it to you will help.