/// <summary> /// On Mac OS X PlayerPrefs are stored in ~/Library/Preferences folder, in a file named unity.[company name].[product name].plist, /// where company and product names are the names set up in Project Settings. The same .plist file is used for both Projects run /// in the Editor and standalone players. (http://docs.unity3d.com/ScriptReference/PlayerPrefs.html) /// </summary> void RefreshPlayerPrefsOSX() { var prefsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/Library/Preferences/unity." + PlayerSettings.companyName + "." + PlayerSettings.productName + ".plist"; if (File.Exists(prefsPath)) { var prefsPlist = (Dictionary <string, object>)Plist.readPlist(prefsPath); foreach (var prefsKey in prefsPlist.Keys) { var keyName = prefsKey; if (!_systemEntries.Contains(keyName)) { _playerPrefsEntries.Add(new PlayerPrefsEntry(keyName)); } } } else { } }
/// <summary> /// On Mac OS X PlayerPrefs are stored in ~/Library/Preferences folder, in a file named com.unity3d.UnityEditor.plist /// </summary> void RefreshEditorPrefsOSX() { var prefsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/Library/Preferences/com.unity3d.UnityEditor.plist"; if (File.Exists(prefsPath)) { var prefsPlist = (Dictionary <string, object>)Plist.readPlist(prefsPath); foreach (var prefsKey in prefsPlist.Keys) { var keyName = prefsKey; _editorPrefsEntries.Add(new PrefsEntry(keyName, false) { MatchesFilter = keyName.IndexOf(_editorPrefsFilter + "", StringComparison.OrdinalIgnoreCase) >= 0 }); } } else { Debug.Log("OSX Prefs file not found '" + prefsPath + "'"); } }
/// <summary> /// On Mac OS X PlayerPrefs are stored in ~/Library/Preferences folder, in a file named unity.[company name].[product name].plist, /// where company and product names are the names set up in Project Settings. The same .plist file is used for both Projects run /// in the Editor and standalone players. (http://docs.unity3d.com/ScriptReference/PlayerPrefs.html) /// </summary> void RefreshPlayerPrefsOSX() { var prefsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/Library/Preferences/unity." + PlayerSettings.companyName + "." + PlayerSettings.productName + ".plist"; if (File.Exists(prefsPath)) { var prefsPlist = (Dictionary <string, object>)Plist.readPlist(prefsPath); foreach (var prefsKey in prefsPlist.Keys) { var keyName = prefsKey; if (!_systemEntries.Contains(keyName)) { _playerPrefsEntries.Add(new PrefsEntry(keyName, true) { MatchesFilter = keyName.IndexOf(_playerPrefsFilter + "", StringComparison.OrdinalIgnoreCase) >= 0 }); } } } else { Debug.Log("OSX Prefs file not found '" + prefsPath + "'"); } }