using Misaki.ShaderGUI; using UnityEditor; using UnityEngine; namespace Misaki.HdrpToon.Editor { internal class AngelRingScope : MaterialUIScope { private static class Properties { public static MaterialProperty angelRingColor; public static MaterialProperty angelRingColorMap; public static MaterialProperty angelRingIntensity; } private static class Styles { public static readonly GUIContent angelRingColorText = new("Angel Ring Color", "Specifies the color of the angel ring."); public static readonly GUIContent angelRingIntensityText = new("Angel Ring Intensity", "Specifies the intensity of the angel ring."); } protected override bool ShowSection => owner.GetUIScope().HasFeature(SurfaceFeatureFlags.AngelRing); protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.AngelRing; protected override GUIContent Header => EditorGUIUtility.TrTextContent("Angel Ring Settings"); public override void LoadMaterialProperties() { Properties.angelRingColor = FindProperty("_AngelRingColor"); Properties.angelRingColorMap = FindProperty("_AngelRingColorMap"); Properties.angelRingIntensity = FindProperty("_AngelRingIntensity"); } protected override void DrawContent() { editor.TexturePropertySingleLine(Styles.angelRingColorText, Properties.angelRingColorMap, Properties.angelRingColor); editor.ShaderProperty(Properties.angelRingIntensity, Styles.angelRingIntensityText); EditorGUILayout.Space(); editor.TextureScaleOffsetProperty(Properties.angelRingColorMap); } } }