public static void FillRect(Rect rect, Color color)
{
if (rect.xMax == 0 || rect.yMax == 0) { return; }
#if UNITY_EDITOR
if (!lineTex)
{
Initialize();
}
#endif
// We shouldn't draw until we are told to do so.
//if (Event.current.type != EventType.Repaint)
// return;
// Please assign a material that is using position and color.
//if (material == null)
//{
// Debug.LogError("You have forgot to set a material.");
// return;
//}
Texture2D tex = lineTex;
Material mat = blitMaterial;
Graphics.DrawTexture(rect, tex, rect, 0, 0, 0, 0, color, mat);
}