Skip to content

Commit f76250e

Browse files
committed
fix: display path in window
1 parent f71fddf commit f76250e

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Assets/Code/Editor/SaveWindowEditor.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void OnEnable()
4444

4545
protected override void DrawEditor(int index)
4646
{
47-
DrawSection("🧠 PlayerPrefs Preview", SavePath, PrefsMessage, DecodedPrefsData, ref scrollPrefs,
47+
DrawSection("🧠 PlayerPrefs Preview", GetPlayerPrefsStoragePath(), PrefsMessage, DecodedPrefsData, ref scrollPrefs,
4848
Refresh, DeletePlayerPrefs);
4949

5050
GUILayout.Space(20);
@@ -149,7 +149,6 @@ private void RefreshJsonFile()
149149
}
150150
}
151151

152-
153152
private void DeletePlayerPrefs()
154153
{
155154
if (PlayerPrefs.HasKey(PlayerPrefsKey))
@@ -170,6 +169,17 @@ private void DeleteJson()
170169
Refresh();
171170
}
172171
}
172+
173+
private string GetPlayerPrefsStoragePath()
174+
{
175+
#if UNITY_EDITOR_WIN
176+
return $@"Windows Registry:\HKEY_CURRENT_USER\Software\Unity\UnityEditor\{Application.companyName}\{Application.productName}";
177+
#elif UNITY_EDITOR_OSX
178+
return $"~/Library/Preferences/unity.{Application.companyName}.{Application.productName}.plist";
179+
#else
180+
return "📦 Platform not supported for PlayerPrefs path preview.";
181+
#endif
182+
}
173183
}
174184
}
175185
#endif

Assets/Code/Infrastructure/Services/GameStater/GameStarter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public void Initialize()
3131

3232
SetUpRandomData();
3333
_saveLoadFacade.SaveProgress(SaveMethod.PlayerPrefs);
34+
35+
SetUpRandomData();
3436
_saveLoadFacade.SaveProgress(SaveMethod.Json);
3537
}
3638

0 commit comments

Comments
 (0)