1
using UnityEngine
.Rendering
.PostProcessing
;
3 namespace UnityEditor
.Rendering
.PostProcessing
5 [PostProcessEditor(typeof(ChromaticAberration
))]
6 internal sealed class ChromaticAberrationEditor
: PostProcessEffectEditor
<ChromaticAberration
>
8 SerializedParameterOverride m_SpectralLut
;
9 SerializedParameterOverride m_Intensity
;
10 SerializedParameterOverride m_FastMode
;
12 public override void OnEnable()
14 m_SpectralLut
= FindParameterOverride(x
=> x
.spectralLut
);
15 m_Intensity
= FindParameterOverride(x
=> x
.intensity
);
16 m_FastMode
= FindParameterOverride(x
=> x
.fastMode
);
19 public override void OnInspectorGUI()
21 base.OnInspectorGUI();
23 PropertyField(m_SpectralLut
);
24 PropertyField(m_Intensity
);
25 PropertyField(m_FastMode
);
27 if (m_FastMode
.overrideState
.boolValue
&& !m_FastMode
.value.boolValue
&& EditorUtilities
.isTargetingConsolesOrMobiles
)
28 EditorGUILayout
.HelpBox("For performance reasons it is recommended to use Fast Mode on mobile and console platforms.", MessageType
.Warning
);