/ Published in: C#

Draw rectangle with alpha (Unity GUI)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static void DrawRectangle(Rect rect, Color color, float alpha = 0f) { color.a = alpha; texture.SetPixel(0, 0, color); texture.wrapMode = TextureWrapMode.Repeat; texture.Apply(); GUI.DrawTexture(rect, texture); }
Comments
