@@ -11,8 +11,10 @@ public class DebugLogManagerEditor : Editor
1111 private SerializedProperty enableHorizontalResizing ;
1212 private SerializedProperty resizeFromRight ;
1313 private SerializedProperty minimumWidth ;
14- private SerializedProperty enablePopup ;
15- private SerializedProperty startInPopupMode ;
14+ private SerializedProperty logWindowOpacity ;
15+ private SerializedProperty popupOpacity ;
16+ private SerializedProperty popupVisibility ;
17+ private SerializedProperty popupVisibilityLogFilter ;
1618 private SerializedProperty startMinimized ;
1719 private SerializedProperty toggleWithKey ;
1820 private SerializedProperty toggleKey ;
@@ -37,6 +39,9 @@ public class DebugLogManagerEditor : Editor
3739 private SerializedProperty popupAvoidsScreenCutout ;
3840 private SerializedProperty autoFocusOnCommandInputField ;
3941
42+ #if UNITY_2017_3_OR_NEWER
43+ private readonly GUIContent popupVisibilityLogFilterLabel = new GUIContent ( "Log Filter" , "Determines which log types will show the popup on screen" ) ;
44+ #endif
4045 private readonly GUIContent receivedLogTypesLabel = new GUIContent ( "Received Log Types" , "Only these logs will be received by the console window, other logs will simply be skipped" ) ;
4146 private readonly GUIContent receiveInfoLogsLabel = new GUIContent ( "Info" ) ;
4247 private readonly GUIContent receiveWarningLogsLabel = new GUIContent ( "Warning" ) ;
@@ -50,8 +55,10 @@ private void OnEnable()
5055 enableHorizontalResizing = serializedObject . FindProperty ( "enableHorizontalResizing" ) ;
5156 resizeFromRight = serializedObject . FindProperty ( "resizeFromRight" ) ;
5257 minimumWidth = serializedObject . FindProperty ( "minimumWidth" ) ;
53- enablePopup = serializedObject . FindProperty ( "enablePopup" ) ;
54- startInPopupMode = serializedObject . FindProperty ( "startInPopupMode" ) ;
58+ logWindowOpacity = serializedObject . FindProperty ( "logWindowOpacity" ) ;
59+ popupOpacity = serializedObject . FindProperty ( "popupOpacity" ) ;
60+ popupVisibility = serializedObject . FindProperty ( "popupVisibility" ) ;
61+ popupVisibilityLogFilter = serializedObject . FindProperty ( "popupVisibilityLogFilter" ) ;
5562 startMinimized = serializedObject . FindProperty ( "startMinimized" ) ;
5663 toggleWithKey = serializedObject . FindProperty ( "toggleWithKey" ) ;
5764#if ENABLE_INPUT_SYSTEM && ! ENABLE_LEGACY_INPUT_MANAGER
@@ -103,11 +110,26 @@ public override void OnInspectorGUI()
103110
104111 EditorGUILayout . Space ( ) ;
105112
106- EditorGUILayout . PropertyField ( enablePopup ) ;
107- if ( enablePopup . boolValue )
108- DrawSubProperty ( startInPopupMode ) ;
109- else
110- DrawSubProperty ( startMinimized ) ;
113+ EditorGUILayout . PropertyField ( startMinimized ) ;
114+ EditorGUILayout . PropertyField ( logWindowOpacity ) ;
115+ EditorGUILayout . PropertyField ( popupOpacity ) ;
116+
117+ EditorGUILayout . PropertyField ( popupVisibility ) ;
118+ if ( popupVisibility . intValue == ( int ) PopupVisibility . WhenLogReceived )
119+ {
120+ EditorGUI . indentLevel ++ ;
121+ #if UNITY_2017_3_OR_NEWER
122+ popupVisibilityLogFilter . intValue = ( int ) ( DebugLogFilter ) EditorGUILayout . EnumFlagsField ( popupVisibilityLogFilterLabel , ( DebugLogFilter ) popupVisibilityLogFilter . intValue ) ;
123+ #else
124+ EditorGUI . BeginChangeCheck ( ) ;
125+ bool infoLog = EditorGUILayout . Toggle ( "Info" , ( ( DebugLogFilter ) popupVisibilityLogFilter . intValue & DebugLogFilter . Info ) == DebugLogFilter . Info ) ;
126+ bool warningLog = EditorGUILayout . Toggle ( "Warning" , ( ( DebugLogFilter ) popupVisibilityLogFilter . intValue & DebugLogFilter . Warning ) == DebugLogFilter . Warning ) ;
127+ bool errorLog = EditorGUILayout . Toggle ( "Error" , ( ( DebugLogFilter ) popupVisibilityLogFilter . intValue & DebugLogFilter . Error ) == DebugLogFilter . Error ) ;
128+ if ( EditorGUI . EndChangeCheck ( ) )
129+ popupVisibilityLogFilter . intValue = ( infoLog ? ( int ) DebugLogFilter . Info : 0 ) | ( warningLog ? ( int ) DebugLogFilter . Warning : 0 ) | ( errorLog ? ( int ) DebugLogFilter . Error : 0 ) ;
130+ #endif
131+ EditorGUI . indentLevel -- ;
132+ }
111133
112134 EditorGUILayout . PropertyField ( toggleWithKey ) ;
113135 if ( toggleWithKey . boolValue )
0 commit comments