UnityEditor.AudioMixerDrawUtils.DrawRect C# (CSharp) Method

DrawRect() public static method

public static DrawRect ( Rect rect, Color color ) : void
rect UnityEngine.Rect
color Color
return void
        public static void DrawRect(Rect rect, Color color)
        {
            Color color2 = GUI.color;
            GUI.color = color;
            GUI.Label(rect, GUIContent.Temp(string.Empty), EditorGUIUtility.whiteTextureStyle);
            GUI.color = color2;
        }

Usage Example

示例#1
0
        protected static void DrawVU(Rect r, float level, float blend, bool topdown)
        {
            level = 1f - level;
            Rect rect = new Rect(r.x + 1f, r.y + 1f + ((!topdown) ? (level * r.height) : 0f), r.width - 2f, r.y - 2f + ((!topdown) ? (r.height - level * r.height) : (level * r.height)));

            AudioMixerDrawUtils.DrawRect(r, new Color(0.1f, 0.1f, 0.1f));
            AudioMixerDrawUtils.DrawRect(rect, new Color(0.6f, 0.2f, 0.2f));
        }
All Usage Examples Of UnityEditor.AudioMixerDrawUtils::DrawRect