private void OnGUI()
        {
            if (SpriteAuditorUtility.IsMemoryDataDirty)
            {
                LoadOrCreateDatabase();
            }

            if (SpriteAuditorUtility.IsIsSpriteDataDirty)
            {
                UpdateSpriteData();
            }

            if (SpriteAuditorUtility.IsSaveDataDirty)
            {
                StoreDatabase();
            }

            if (SpriteAuditorUtility.IsReferencesDirty)
            {
                ResultView.GenerateResults(SpriteDatabase);
                SpriteAuditorUtility.SetResultViewUpdated();
            }

            DrawSettings();
            DrawResults();
        }
        private void DrawResults()
        {
            if (SpriteAuditorUtility.IsMemoryDataDirty)
            {
                LoadOrCreateAtlasResult();
            }

            if (SpriteDatabase == null)
            {
                return;
            }

            EditorGUILayout.BeginVertical("Box");
            EditorGUILayout.LabelField("Results", EditorStyles.toolbarDropDown);
            EditorGUILayout.Space();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginHorizontal("Box");
            EditorGUI.BeginChangeCheck();
            visualizationType =
                (VisualizationType)GUILayout.SelectionGrid((int)visualizationType, VISUALIZATION_NAMES, 3,
                                                           EditorStyles.radioButton);
            if (EditorGUI.EndChangeCheck())
            {
                CreateResultViewByVisualizationType();
                SpriteAuditorUtility.SetResultViewDirty();
            }

            EditorGUILayout.EndHorizontal();
            EditorGUILayout.BeginHorizontal("Box");

            ResultView.DrawFilterOptions();

            EditorGUILayout.EndHorizontal();
            EditorGUILayout.EndHorizontal();

            if (SpriteAuditorUtility.IsReferencesDirty)
            {
                AtlasCacheUtility.ClearAtlasCache();
                ResultView.GenerateResults(SpriteDatabase);
                SpriteAuditorUtility.SetResultViewUpdated();
            }

            ResultView.DrawResults(SpriteDatabase);

            EditorGUILayout.EndVertical();
        }