CharacterCaracteristics.DrawQuad C# (CSharp) Method

DrawQuad() public method

public DrawQuad ( Rect position, Color color ) : void
position Rect
color Color
return void
    void DrawQuad(Rect position, Color color)
    {
        Texture2D texture = new Texture2D(1, 1);
        texture.SetPixel(0,0,color);
        texture.Apply();
        GUI.skin.box.normal.background = texture;
        GUI.Box(position, GUIContent.none);
    }