1.3.0: Added EditorProjectPrefs, so each project can have their own settings for history and favorites
This commit is contained in:
parent
65ca5dd355
commit
c54a325cfe
7 changed files with 100 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Module.NavigationTool.Editor.Utilities;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
|
@ -18,7 +19,7 @@ namespace Module.NavigationTool.Editor.History
|
|||
public HistoryList()
|
||||
{
|
||||
entries = new List<Entry>();
|
||||
string json = EditorPrefs.GetString(PREF_ID);
|
||||
string json = EditorProjectPrefs.GetString(PREF_ID);
|
||||
|
||||
if (!string.IsNullOrEmpty(json))
|
||||
EditorJsonUtility.FromJsonOverwrite(json, this);
|
||||
|
|
@ -96,7 +97,7 @@ namespace Module.NavigationTool.Editor.History
|
|||
public void Save()
|
||||
{
|
||||
string json = EditorJsonUtility.ToJson(this, false);
|
||||
EditorPrefs.SetString(PREF_ID, json);
|
||||
EditorProjectPrefs.SetString(PREF_ID, json);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue