From 21e186f75b504d832d9c7bef0456edd7d5d3155e Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 8 Sep 2021 10:52:35 +0800 Subject: +behavior design --- .../Editor/StyledMaterial/StyledCategoryDrawer.cs | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs (limited to 'Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs') diff --git a/Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs b/Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs deleted file mode 100644 index 640cfed7..00000000 --- a/Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Cristian Pop - https://boxophobic.com/ - -using UnityEngine; -using UnityEditor; -using System; - -namespace Boxophobic.StyledGUI -{ - public class StyledCategoryDrawer : MaterialPropertyDrawer - { - public string category; - - public StyledCategoryDrawer(string category) - { - this.category = category; - } - - public override void OnGUI(Rect position, MaterialProperty prop, String label, MaterialEditor materiaEditor) - { - if (prop.floatValue < 0) - { - GUI.enabled = true; - EditorGUI.indentLevel = 0; - } - else - { - GUI.enabled = true; - EditorGUI.indentLevel = 0; - StyledGUI.DrawInspectorCategory(position, category); - } - } - - public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor) - { - if (prop.floatValue < 0) - { - return -2; - } - else - { - return 40; - } - } - } -} -- cgit v1.1-26-g67d0