FillRect() public static méthode

矩形塗りつぶし
public static FillRect ( Rect rect, Color color ) : void
rect Rect
color Color
Résultat void
        /// <summary>
        /// 矩形塗りつぶし
        /// </summary>
        /// <param name="rect"></param>
        /// <param name="color"></param>
        static public void Fill(Rect rect, Color color)
        {
            if (rect.xMax == 0 || rect.yMax == 0)
            {
                return;
            }

            Color tmp = GUI.color;

#if true
            Drawing.FillRect(rect, color);
#else
            // GUIを使ってるのでOnDrawGUIで描画しないと他のボタンとかが反応しなくなることが...何それ。
            //Texture2D tex = GUI.skin.box.normal.background;

            GUI.color = color;
            //GUI.Box(rect, "");

            //Texture2D texture = new Texture2D(1, 1);
            //texture.SetPixel(0, 0, color);
            //texture.Apply();
            //GUI.skin.box.normal.background = texture;
            GUI.Box(rect, GUIContent.none);

            //GUI.skin.box.normal.background = tex;
#endif
            GUI.color = tmp;
        }