Skip to content

Commit 222604d

Browse files
committed
Fix PlayerPrefs caching on Linux
1 parent db4857d commit 222604d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Assets/PatchKit Patcher/Scripts/AppData/Local/UnityCache.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ private string FormatKey(string key)
2727

2828
public void SetValue(string key, string value)
2929
{
30-
UnityDispatcher.Invoke(() => PlayerPrefs.SetString(FormatKey(key), value)).WaitOne();
30+
UnityDispatcher.Invoke(() =>
31+
{
32+
PlayerPrefs.SetString(FormatKey(key), value);
33+
PlayerPrefs.Save();
34+
}).WaitOne();
3135
}
3236

3337
public string GetValue(string key, string defaultValue = null)

0 commit comments

Comments
 (0)