示例#1
0
        public override void OnGUI(Rect position, MaterialProperty prop, String label, MaterialEditor materiaEditor)
        {
            //EditorGUI.DrawRect(position, new Color(0, 1, 0, 0.1f));

            GUI.enabled = true;
            BEditorGUI.DrawCategory(position, Category);
        }
示例#2
0
        public override void OnGUI(Rect position, MaterialProperty prop, String label, MaterialEditor materialEditor)
        {
            //EditorGUI.DrawRect(position, new Color(0, 1, 0, 0.05f));

            Material material = materialEditor.target as Material;

            if (title == null && subtitle == null)
            {
                title    = prop.displayName;
                subtitle = null;
            }

            bannerText    = title;
            bannerSubText = subtitle;

            if (rValue < 0)
            {
                bannerColor = BConst.ColorDarkGray;
            }
            else
            {
                bannerColor = new Color(rValue, gValue, bValue);
            }

            BEditorGUI.DrawMaterialBanner(bannerColor, bannerText, bannerSubText, material.shader);
        }
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            a        = (BCategoryAttribute)attribute;
            category = a.Category;

            GUI.enabled = true;
            BEditorGUI.DrawCategory(position, category);
        }