public override void OnInspectorGUI()
        {
            serializedObject.Update();
            var arraySizeProp = m_SearchSettings.FindPropertyRelative("Array.size");

            EditorGUILayout.PropertyField(arraySizeProp);
            serializedObject.ApplyModifiedProperties();

            if (m_MaterialTextureSettings == null)
            {
                m_MaterialTextureSettings = target as MaterialTextureSettings;
            }

            EditorGUI.indentLevel++;
            serializedObject.Update();

            for (var i = 0; i < m_SearchSettings.arraySize; i++)
            {
                var textureSearch = m_MaterialTextureSettings.searchSettings[i];
                SearchSettingsDrawer(m_SearchSettings.GetArrayElementAtIndex(i), textureSearch, i);
            }

            EditorGUILayout.Separator();
            serializedObject.ApplyModifiedProperties();
            EditorGUI.indentLevel--;

            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginDisabledGroup(m_SearchSettings.arraySize < 1);
            if (GUILayout.Button("Apply All"))
            {
                for (var i = 0; i < m_MaterialTextureSettings.searchSettings.Length; i++)
                {
                    var textureSearch = m_MaterialTextureSettings.searchSettings[i];
                    ApplySettingsToSelection(textureSearch);
                }
            }
            if (GUILayout.Button("Clear All"))
            {
                for (var i = 0; i < m_MaterialTextureSettings.searchSettings.Length; i++)
                {
                    var textureSearch = m_MaterialTextureSettings.searchSettings[i];
                    ClearSettingsOnSelection(textureSearch);
                }
            }
            EditorGUI.EndDisabledGroup();
            EditorGUILayout.EndHorizontal();

            var logsRec = EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.MinHeight(150));

            EditorGUI.DrawRect(logsRec, m_DarkWindow);
            m_LogsScrollView = EditorGUILayout.BeginScrollView(m_LogsScrollView);
            EditorGUILayout.TextArea(m_Logs);

            EditorGUILayout.EndVertical();
            EditorGUILayout.EndScrollView();
        }
 void OnEnable()
 {
     m_SearchSettings          = serializedObject.FindProperty(MaterialTextureSettings.searchSettingsPub);
     m_MaterialTextureSettings = target as MaterialTextureSettings;
 }