public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { --EditorGUI.indentLevel; Initialize(property); if (UnityHelpers.UsingHDRP()) { m_SupportedSources = ImageSource.MainCamera | ImageSource.TaggedCamera; } using (var check = new EditorGUI.ChangeCheckScope()) { if (m_MaskedSourceNames == null) { m_MaskedSourceNames = EnumHelper.MaskOutEnumNames <ImageSource>((int)m_SupportedSources); } var index = EnumHelper.GetMaskedIndexFromEnumValue <ImageSource>(m_Source.intValue, (int)m_SupportedSources); index = EditorGUILayout.Popup(Styles.CameraLabel, index, m_MaskedSourceNames); if (check.changed) { m_Source.intValue = EnumHelper.GetEnumValueFromMaskedIndex <ImageSource>(index, (int)m_SupportedSources); } } var inputType = (ImageSource)m_Source.intValue; if ((ImageSource)m_Source.intValue == ImageSource.TaggedCamera) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(m_CameraTag, Styles.TagLabel); --EditorGUI.indentLevel; } EditorGUILayout.PropertyField(m_OutputResolution, Styles.OutputResolutionLabel); if (inputType == ImageSource.ActiveCamera) { EditorGUILayout.PropertyField(m_IncludeUI, Styles.IncludeUILabel); } EditorGUILayout.PropertyField(m_FlipFinalOutput, Styles.FlipVerticalLabel); ++EditorGUI.indentLevel; }