From d69611d66431e28ea35477c6781a00d57ae04fa3 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Apr 2021 21:13:03 +0800 Subject: =?UTF-8?q?*=E5=9B=A0=E4=B8=BA=E6=B2=A1=E6=9C=89meta=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4missing=EF=BC=8C=E5=88=A0=E9=99=A4UIEffect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Test/UIEffect/Program/Editor/UIShadowEditor.cs | 62 ---------------------- 1 file changed, 62 deletions(-) delete mode 100644 Assets/Test/UIEffect/Program/Editor/UIShadowEditor.cs (limited to 'Assets/Test/UIEffect/Program/Editor/UIShadowEditor.cs') diff --git a/Assets/Test/UIEffect/Program/Editor/UIShadowEditor.cs b/Assets/Test/UIEffect/Program/Editor/UIShadowEditor.cs deleted file mode 100644 index 64f01d6..0000000 --- a/Assets/Test/UIEffect/Program/Editor/UIShadowEditor.cs +++ /dev/null @@ -1,62 +0,0 @@ -using UnityEditor; -using UnityEditorInternal; -using UnityEngine; - -namespace Coffee.UIEffects.Editors -{ - /// - /// UIShadow editor. - /// - [CustomEditor(typeof(UIShadow))] - [CanEditMultipleObjects] - public class UIShadowEditor : Editor - { - UIEffect uiEffect; - SerializedProperty _spStyle; - SerializedProperty _spEffectDistance; - SerializedProperty _spEffectColor; - SerializedProperty _spUseGraphicAlpha; - SerializedProperty _spBlurFactor; - - void OnEnable() - { - uiEffect = (target as UIShadow).GetComponent(); - _spStyle = serializedObject.FindProperty("m_Style"); - _spEffectDistance = serializedObject.FindProperty("m_EffectDistance"); - _spEffectColor = serializedObject.FindProperty("m_EffectColor"); - _spUseGraphicAlpha = serializedObject.FindProperty("m_UseGraphicAlpha"); - _spBlurFactor = serializedObject.FindProperty("m_BlurFactor"); - } - - /// - /// Implement this function to make a custom inspector. - /// - public override void OnInspectorGUI() - { - serializedObject.Update(); - - //================ - // Shadow setting. - //================ - EditorGUILayout.PropertyField(_spStyle); - - // When shadow is enable, show parameters. - if (_spStyle.intValue != (int) ShadowStyle.None) - { - EditorGUI.indentLevel++; - EditorGUILayout.PropertyField(_spEffectDistance); - EditorGUILayout.PropertyField(_spEffectColor); - EditorGUILayout.PropertyField(_spUseGraphicAlpha); - - if (uiEffect && uiEffect.blurMode != BlurMode.None) - { - EditorGUILayout.PropertyField(_spBlurFactor); - } - - EditorGUI.indentLevel--; - } - - serializedObject.ApplyModifiedProperties(); - } - } -} -- cgit v1.1-26-g67d0