Unity3D PlayerPrefs的存储位置

请尊重原作者的工作,转载时请务必注明转载自:www.xionggf.com

平台 存储位置
macOS 存储在 【~/Library/Preferences】 目录下名字为 【unity.[company name].[product name].plist】 文件中,其中的 【company name】【product names】【Project Settings】 面板中设置。而且这个plist文件是为编辑器版本和单独可执行版本的程序共同使用。
Windows 存在注册表中的注册项中,该注册项的路径是 【HKEY_CURRENT_USER\Software[company name][product name]】。其中的 【company name】【product names】【Project Settings】 面板中设置。注意编辑器版本和单独可执行版本的注册表路径是不同的,例如 【company name】“TomCompany” ,例如 【product name】“TomGame” 的话,在编辑器中执行程序,其注册项路径为 【计算机\HKEY_CURRENT_USER\Software\Unity\UnityEditor\TomCompany\TomGame】
Linux PlayerPrefs存储在 【~/.config/unity3d/[CompanyName]/[ProductName]】 。其中的 【company name】【product names】【Project Settings】 面板中设置.。
Windows Store Apps PlayerPrefs存储在 【%userprofile%\AppData\Local\Packages[ProductPackageId]\LocalState\playerprefs.dat】 文件中
Windows Phone 8 PlayerPrefs存储在应用的 “local folder” 中,可查阅Directory.localFolder
Android PlayerPrefs存储在 【/data/data/pkg-name/shared_prefs/pkg-name.xml】 文件中
WebGL PlayerPrefs存储在浏览器的 “IndexedDB” API中
iOS PlayerPrefs存储在/Library/Preferences/[bundle identifier].plist文件中