summaryrefslogtreecommitdiff
path: root/Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-08 10:52:35 +0800
committerchai <chaifix@163.com>2021-09-08 10:52:35 +0800
commit21e186f75b504d832d9c7bef0456edd7d5d3155e (patch)
treee73c43fc78d0326f32da5fadfda57fa8e23c1d90 /Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs
parent7bd7b4c6c3be6840cab06aa4d8a38619bce44705 (diff)
+behavior design
Diffstat (limited to 'Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs')
-rw-r--r--Assets/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledCategoryDrawer.cs45
1 files changed, 0 insertions, 45 deletions
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;
- }
- }
- }
-}