Browse Source

Correct inspector Delete Save

Now uses method in SaveManager directly to prevent duplicate and divergent path.
Fix #808
master
shalliwell 5 years ago
parent
commit
24c6864f67
  1. 2
      Assets/Fungus/Scripts/Components/SaveManager.cs
  2. 2
      Assets/Fungus/Scripts/Editor/SaveMenuEditor.cs

2
Assets/Fungus/Scripts/Components/SaveManager.cs

@ -235,7 +235,7 @@ namespace Fungus
/// <summary> /// <summary>
/// Deletes a previously stored Save History from persistent storage. /// Deletes a previously stored Save History from persistent storage.
/// </summary> /// </summary>
public void Delete(string saveDataKey) public static void Delete(string saveDataKey)
{ {
#if UNITY_WEBPLAYER || UNITY_WEBGL #if UNITY_WEBPLAYER || UNITY_WEBGL
PlayerPrefs.DeleteKey(saveDataKey); PlayerPrefs.DeleteKey(saveDataKey);

2
Assets/Fungus/Scripts/Editor/SaveMenuEditor.cs

@ -19,7 +19,7 @@ namespace Fungus.EditorUtils
if (saveMenu != null) if (saveMenu != null)
{ {
PlayerPrefs.DeleteKey(saveMenu.SaveDataKey); SaveManager.Delete(saveMenu.SaveDataKey);
FlowchartWindow.ShowNotification("Deleted Save Data"); FlowchartWindow.ShowNotification("Deleted Save Data");
} }
} }

Loading…
Cancel
Save