void OnEnable()
        {
            _headerTexture      = EntitasEditorLayout.LoadTexture("l:EntitasHeader");
            _preferencesDrawers = AppDomain.CurrentDomain
                                  .GetInstancesOf <IEntitasPreferencesDrawer>()
                                  .OrderBy(drawer => drawer.priority)
                                  .ToArray();

            try {
                _preferences = Preferences.sharedInstance;
                _preferences.Refresh();

                foreach (var drawer in _preferencesDrawers)
                {
                    drawer.Initialize(_preferences);
                }

                _preferences.Save();
            } catch (Exception ex) {
                _configException = ex;
            }
        }
 public static void OpenPreferences()
 {
     EntitasEditorLayout.ShowWindow <PreferencesWindow>("Entitas " + CheckForUpdates.GetLocalVersion());
 }