public override void OnInspectorGUI() { MKGlowFree mkGlow = (MKGlowFree)target; EditorGUI.BeginChangeCheck(); serializedObject.Update(); if (HandleBehavior("Main", ref showMainBehavior)) { EditorGUILayout.PropertyField(glowType); if (glowType.enumValueIndex == 0) { EditorGUILayout.PropertyField(glowLayer); } EditorGUILayout.IntSlider(samples, 2, 4, "Samples"); EditorGUILayout.IntSlider(blurIterations, 1, 10, "Iterations"); if (glowType.enumValueIndex == 2) { threshold.floatValue = EditorGUILayout.FloatField("Threshold", threshold.floatValue); } glowTint.colorValue = EditorGUILayout.ColorField(glowTintLabel, glowTint.colorValue, false, false, false, colorPickerHDRConfig); } if (HandleBehavior("Glow Inner", ref showInnerGlowBehavior)) { EditorGUILayout.Slider(blurSpreadInner, 0.0f, 2.0f, "Spread Inner"); EditorGUILayout.Slider(glowIntensityInner, 0.0f, 1.0f, "Intensity"); } serializedObject.ApplyModifiedProperties(); EditorGUI.EndChangeCheck(); }
public override void OnInspectorGUI() { MKGlowFree mkGlow = (MKGlowFree)target; EditorGUI.BeginChangeCheck(); serializedObject.Update(); //EditorGUILayout.LabelField("_Debug_", GuiStyles.header); //EditorGUILayout.PropertyField(debugMode); //EditorGUILayout.PropertyField(rtFormat); if (HandleBehavior("Main", ref showMainBehavior)) { EditorGUILayout.PropertyField(glowType); if (glowType.enumValueIndex == 0) { EditorGUILayout.PropertyField(glowLayer); } EditorGUILayout.IntSlider(samples, 2, 4, "Samples"); EditorGUILayout.IntSlider(blurIterations, 1, 10, "Iterations"); if (glowType.enumValueIndex == 2) { threshold.floatValue = EditorGUILayout.FloatField("Threshold", threshold.floatValue); } #pragma warning disable CS0618 // Type or member is obsolete glowTint.colorValue = EditorGUILayout.ColorField(glowTintLabel, glowTint.colorValue, false, false, false, colorPickerHDRConfig); #pragma warning restore CS0618 // Type or member is obsolete } if (HandleBehavior("Glow Inner", ref showInnerGlowBehavior)) { EditorGUILayout.Slider(blurSpreadInner, 0.0f, 2.0f, "Spread Inner"); EditorGUILayout.Slider(glowIntensityInner, 0.0f, 1.0f, "Intensity"); } serializedObject.ApplyModifiedProperties(); EditorGUI.EndChangeCheck(); }