From 55d289f8eff1af2d2a2ff02c878faa354dcf6c91 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 8 Sep 2021 10:54:48 +0800 Subject: *move directory --- .../StyledMaterial/StyledInteractiveDrawer.cs | 92 ---------------------- 1 file changed, 92 deletions(-) delete mode 100644 Assets/Art/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledInteractiveDrawer.cs (limited to 'Assets/Art/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledInteractiveDrawer.cs') diff --git a/Assets/Art/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledInteractiveDrawer.cs b/Assets/Art/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledInteractiveDrawer.cs deleted file mode 100644 index 3f321cbe..00000000 --- a/Assets/Art/BOXOPHOBIC/Utils/Editor/StyledMaterial/StyledInteractiveDrawer.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Cristian Pop - https://boxophobic.com/ - -using UnityEngine; -using UnityEditor; -using System; - -namespace Boxophobic.StyledGUI -{ - public class StyledInteractiveDrawer : MaterialPropertyDrawer - { - public string keyword; - public float value1 = -1f; - public float value2 = -1f; - public float value3 = -1f; - - protected int type; - - public StyledInteractiveDrawer(string k) - { - type = 0; - keyword = k; - } - - public StyledInteractiveDrawer(string k, float v1) - { - type = 1; - keyword = k; - value1 = v1; - } - - public StyledInteractiveDrawer(string k, float v1, float v2) - { - type = 1; - keyword = k; - value1 = v1; - value2 = v2; - } - - public StyledInteractiveDrawer(string k, float v1, float v2, float v3) - { - type = 1; - keyword = k; - value1 = v1; - value2 = v2; - value3 = v3; - } - - public override void OnGUI(Rect position, MaterialProperty prop, String label, MaterialEditor materialEditor) - { - Material material = materialEditor.target as Material; - - if (type == 1) - { - if (material.HasProperty(keyword)) - { - if (value1 == material.GetFloat(keyword) || value2 == material.GetFloat(keyword) || value3 == material.GetFloat(keyword)) - { - GUI.enabled = true; - } - else - { - GUI.enabled = false; - } - } - } - else if (type == 0) - { - if (keyword == "ON") - { - GUI.enabled = true; - } - else if (keyword == "OFF") - { - GUI.enabled = false; - } - else if (material.IsKeywordEnabled(keyword)) - { - GUI.enabled = true; - } - else - { - GUI.enabled = false; - } - } - } - - public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor) - { - return -2; - } - } -} \ No newline at end of file -- cgit v1.1-26-g67d0