Render GUI with Material

Hi,

Does anyone know how to render a 2D Texture with an attached element? I can't use Graphics.DrawTexture, because this is only available in the pro version.

GUI.DrawTexture, cant use any material. The reason i want to do this, is that i want to change the color of an image in code. I can do this with the material and a Transparent/Cutoff/Diffuse shader on it.

Thanks

You could just use GUI.color to change the colour of the texture:

GUI.color = Color.red; //tint the texture red
GUI.DrawTexture(rect, tex);
GUI.color = Color.white; //set it back to normal so it doesn't screw the rest of the GUI

Alternatively you could use a GUITexture, which will let you set the material