protected void OnDestroy()
 {
     AssemblyReloadEvents.beforeAssemblyReload -= Close;
     _currentlyOpenStorageInspector             = null;
     _capsuleUIItems          = null;
     _currentlyViewingStorage = null;
 }
        private static StorageInspectorEditor OpenWindow()
        {
            if (_currentlyOpenStorageInspector != null)
            {
                _currentlyOpenStorageInspector.Focus();
                return(_currentlyOpenStorageInspector);
            }

            StorageInspectorEditor window = GetWindow <StorageInspectorEditor>();

            window.titleContent = new GUIContent("Storage Inspector");
            window.Show();
            window.Focus();
            _currentlyOpenStorageInspector = window;
            return(window);
        }
        private static void ValidateStorage(StorageInspectorEditor.CorruptionState corruptionStateOpenTriggers)
        {
            switch (StorageInspectorEditor.ValidateStorage(GetStorageLocation(), Storage.EncodingType.Base64, corruptionStateOpenTriggers))
            {
            case StorageInspectorEditor.CorruptionState.Error:
                Debug.LogError("Storage Contains an Error!");
                break;

            case StorageInspectorEditor.CorruptionState.Warning:
                Debug.LogWarning("Storage Contains a Warning!");
                break;

            case StorageInspectorEditor.CorruptionState.None:
                Debug.Log("<color=green>Storage is valid!</color>");
                break;
            }
        }