Revision: 64281
Updated Code
at July 18, 2013 23:08 by Solipsist
Updated Code
public static void DrawRectangle(Rect rect, Color color, float alpha = 0f) { Texture2D texture = new Texture2D(1, 1); color.a = alpha; texture.SetPixel(0, 0, color); texture.wrapMode = TextureWrapMode.Repeat; texture.Apply(); GUI.DrawTexture(rect, texture); }
Revision: 64280
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 18, 2013 23:07 by Solipsist
Initial Code
public static void DrawRectangle(Rect rect, Color color, float alpha = 0f) { Texture2D texture = new Texture2D(1, 1); color.a = alpha; texture.SetPixel(0, 0, color); texture.wrapMode = TextureWrapMode.Repeat; texture.Apply(); GUI.DrawTexture(rect, texture); }
Initial URL
Initial Description
Draw rectangle with alpha (Unity GUI)
Initial Title
Rectangle with alpha (Unity)
Initial Tags
Initial Language
C#