Skip to content

Commit

Permalink
feat: save last categoryIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
L1247 committed Jan 26, 2023
1 parent e5fd81e commit aa794da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ public class BookmarkEverythingEditor : EditorWindow
int _objectIndexToBeRemovedDueToDeletedAsset = -1;
int _objectIndexToBeRemoved = -1;

Vector2 _settingScrollPos;
bool _changesMade = false;
int _lastlyAddedCount = -1;
Color _defaultGUIColor;
Vector2 _settingScrollPos;
bool _changesMade = false;
int _lastlyAddedCount = -1;
Color _defaultGUIColor;
private int lastProjectFinderTabeIndex;
private const string ProjectfindertabindexKey = "ProjectFinderTabIndex";

#endregion

Expand Down Expand Up @@ -595,7 +597,12 @@ private void DrawProjectFinder()
case 4 : //so
DrawProjectFinderEntries(CATEGORY_SO);
break;
default : break;
}

if (lastProjectFinderTabeIndex != _projectFinderTabIndex)
{
lastProjectFinderTabeIndex = _projectFinderTabIndex;
EditorPrefs.SetInt(ProjectfindertabindexKey , _projectFinderTabIndex);
}
}

Expand Down Expand Up @@ -987,9 +994,12 @@ private void LoadSettings()

private void OnEnable()
{
titleContent = RetrieveGUIContent("Bookmark" , "CustomSorting");
_defaultGUIColor = GUI.color;
minSize = new Vector2(400 , 400);
titleContent = RetrieveGUIContent("Bookmark" , "CustomSorting");
_defaultGUIColor = GUI.color;
minSize = new Vector2(400 , 400);
_projectFinderTabIndex = EditorPrefs.GetInt(ProjectfindertabindexKey);
Debug.Log($"{_projectFinderTabIndex}");
lastProjectFinderTabeIndex = _projectFinderTabIndex;
}

private void OnGUI()
Expand Down
4 changes: 2 additions & 2 deletions BookmarkEverything/UserSettings/EditorUserSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ EditorUserSettings:
serializedVersion: 4
m_ConfigSettings:
RecentlyUsedSceneGuid-0:
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
value: 5507520757065b0f590d092612260f44124f1c2e7c7d7e342f2c4b60b4b4323d
flags: 0
RecentlyUsedSceneGuid-1:
value: 5507520757065b0f590d092612260f44124f1c2e7c7d7e342f2c4b60b4b4323d
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
Expand Down

0 comments on commit aa794da

Please sign in to comment.