diff --git a/Editor/MeterialEditor/UIScopes/ShadingColorSettingsScope.cs b/Editor/MeterialEditor/UIScopes/ShadingColorSettingsScope.cs deleted file mode 100644 index 71717a7..0000000 --- a/Editor/MeterialEditor/UIScopes/ShadingColorSettingsScope.cs +++ /dev/null @@ -1,93 +0,0 @@ -using Misaki.ShaderGUI; -using UnityEditor; -using UnityEngine; - -namespace Misaki.HdrpToon.Editor -{ - public class ShadingColorSettingsScope : MaterialUIScope - { - private static class Properties - { - public static MaterialProperty baseColorMap; - public static MaterialProperty baseColor; - public static MaterialProperty applyTo1stShadingMapEnable; - public static MaterialProperty firstShadingMap; - public static MaterialProperty firstShadingColor; - public static MaterialProperty applyTo2ndShadingMapEnable; - public static MaterialProperty secondShadingMap; - public static MaterialProperty secondShadingColor; - } - - private static class Styles - { - public static readonly GUIContent baseMapText = new("Base Map", - "Base Color : Texture(sRGB) x Color(RGB) Default:White"); - - public static readonly GUIContent applyTo1stShadingMapText = - new("Apply to 1st shading map", "Apply Base map to the 1st shading map."); - - public static readonly GUIContent firstShadingMapText = new("1st Shading Map", "1st shading map."); - public static readonly GUIContent firstShadeColorText = new("1st Shading Color", "1st shading color."); - - public static readonly GUIContent applyTo2ndShadingMapText = - new("Apply to 2nd shading map", "Apply Base map or the 1st shading map to the 2st shading map."); - - public static readonly GUIContent secondShadingMapText = new("2nd Shading Map", "2nd shading map."); - public static readonly GUIContent secondShadeColorText = new("2nd Shading Color", "2nd shading color."); - } - - protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.Basic; - protected override GUIContent Header => EditorGUIUtility.TrTextContent("Shading Color Settings"); - - public override void LoadMaterialProperties() - { - Properties.baseColorMap = FindProperty("_BaseColorMap"); - Properties.baseColor = FindProperty("_BaseColor"); - Properties.applyTo1stShadingMapEnable = FindProperty("_Use_BaseAs1st"); - Properties.firstShadingMap = FindProperty("_1st_ShadeMap"); - Properties.firstShadingColor = FindProperty("_1st_ShadeColor"); - Properties.applyTo2ndShadingMapEnable = FindProperty("_Use_1stAs2nd"); - Properties.secondShadingMap = FindProperty("_2nd_ShadeMap"); - Properties.secondShadingColor = FindProperty("_2nd_ShadeColor"); - } - - protected override void DrawContent() - { - editor.TexturePropertySingleLine(Styles.baseMapText, Properties.baseColorMap, Properties.baseColor); - EditorGUI.indentLevel += 2; - editor.ShaderProperty(Properties.applyTo1stShadingMapEnable, Styles.applyTo1stShadingMapText.text); - EditorGUI.indentLevel -= 2; - - if (Properties.applyTo1stShadingMapEnable.floatValue != 0) - { - EditorGUI.indentLevel += 2; - editor.ColorProperty(Properties.firstShadingColor, Styles.firstShadeColorText.text); - EditorGUI.indentLevel -= 2; - } - else - { - editor.TexturePropertySingleLine(Styles.firstShadingMapText, Properties.firstShadingMap, - Properties.firstShadingColor); - } - - EditorGUI.indentLevel += 2; - editor.ShaderProperty(Properties.applyTo2ndShadingMapEnable, Styles.applyTo2ndShadingMapText); - - EditorGUI.indentLevel -= 2; - if (Properties.applyTo2ndShadingMapEnable.floatValue != 0) - { - EditorGUI.indentLevel += 2; - editor.ColorProperty(Properties.secondShadingColor, Styles.secondShadeColorText.text); - EditorGUI.indentLevel -= 2; - } - else - { - editor.TexturePropertySingleLine(Styles.secondShadingMapText, Properties.secondShadingMap, - Properties.secondShadingColor); - } - - EditorGUILayout.Space(); - editor.TextureScaleOffsetProperty(Properties.baseColorMap); - } - } -} \ No newline at end of file