Где находятся данные PlayerPrefs в проекте?
По какому пути можно найти значения PlayerPrefs в проекте?
PlayerPrefs никак не привязан к проекту/билду, записи хранятся в разных местах на разных ОС:
macOS, PlayerPrefs are stored in
Windows, PlayerPrefs are stored in the registry under HKCU\Software\[company name]\[product name]
Linux, PlayerPrefs can be found in
Windows Store Apps, Player Prefs can be found in %userprofile%\AppData\Local\Packages\[ProductPackageId]>\LocalState\playerprefs.dat
Windows Phone 8, Player Prefs can be found in application’s local folder
Android, data is stored (persisted) on the device. The data is saved in SharedPreferences. C#/JavaScript, Android Java and Native code can all access the PlayerPrefs data. The PlayerPrefs data is physically stored in /data/data/pkg-name/shared_prefs/pkg-name.xml
WebGL, PlayerPrefs are stored using the browser’s IndexedDB API
iOS, PlayerPrefs are stored in /Library/Preferences/[bundle identifier].plist
PlayerPrefs
Благодарим вас за то, что вы помогаете нам улучшить качество документации по Unity. Однако, мы не можем принять любой перевод. Мы проверяем каждый предложенный вами вариант перевода и принимаем его только если он соответствует оригиналу.
Ошибка внесения изменений
По определённым причинам предложенный вами перевод не может быть принят. Пожалуйста <a>попробуйте снова</a> через пару минут. И выражаем вам свою благодарность за то, что вы уделяете время, чтобы улучшить документацию по Unity.
Описание
Stores and accesses player preferences between game sessions.
Editor/Standalone
В Mac OS X параметры игрока (player prefs) хранятся в папке
/Library/Preferences , HKCU
Software
[company name]
[product name] key, где «company name» и «product name» являются The same .plist file is used for both Projects run in the Editor and standalone players.
В Mac OS X параметры игрока (player prefs) хранятся в папке
/Library/Preferences , HKCU\Software\[company name]\[product name] key, where company and product names are именами указанными в настройках проекта.
On Linux, PlayerPrefs can be found in
/.config/unity3d/[CompanyName]/[ProductName] again using the company and product names specified in the Project Settings.
On Windows Store Apps, Player Prefs can be found in %userprofile%\AppData\Local\Packages\[ProductPackageId]>\LocalState\playerprefs.dat
On Windows Phone 8, Player Prefs can be found in application’s local folder, See Also: Windows.Directory.localFolder
On Android data is stored (persisted) on the device. The data is saved in SharerPreferences. C#/JavaScript, Android Java and Native code can all access the PlayerPrefs data. The PlayerPrefs data is physically stored in /data/data/pkg-name/shared_prefs/pkg-name.xml.
WebPlayer
On Web players, PlayerPrefs are stored in binary files in the following locations:
Mac OS X:
Windows: %APPDATA%\Unity\WebPlayerPrefs
В Mac OS X параметры игрока (player prefs) хранятся в папке
There is one preference file per Web player URL and the file size is limited to 1 megabyte. If this limit is exceeded, SetInt, SetFloat and SetString will not store the value and throw a PlayerPrefsException.
PlayerPrefs
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
`PlayerPrefs` is a class that stores Player preferences between game sessions. It can store string, float and integer values into the user’s platform registry.
Unity stores `PlayerPrefs` data differently based on which operating system the application runs on. In the file paths given on this page, the company name and product name are the names you set in Unity’s Player Settings.
Standalone Player storage location
On macOS, PlayerPrefs are stored in
/Library/Preferences/com.ExampleCompanyName.ExampleProductName.plist . Unity uses the same .plist file for projects in the Editor and standalone Players.
On Windows, PlayerPrefs are stored in HKCU\Software\ExampleCompanyName\ExampleProductName key.
On Linux, PlayerPrefs are stored in
On Windows Store Apps, PlayerPrefs are stored in %userprofile%\AppData\Local\Packages\[ProductPackageId]\LocalState\playerprefs.dat .
On Windows Phone 8, Unity stores PlayerPrefs data in the application’s local folder. See Directory.localFolder for more information.
On Android, PlayerPrefs are stored in /data/data/pkg-name/shared_prefs/pkg-name.v2.playerprefs.xml . Unity stores PlayerPrefs data on the device, in SharedPreferences. C#, JavaScript, Android Java and native code can all access the PlayerPrefs data.
On WebGL, Unity stores PlayerPrefs data using the browser’s IndexedDB API. For more information, see IndexedDB.
In-Editor Play mode storage location
On macOS, PlayerPrefs are stored in /Library/Preferences/[bundle identifier].plist .
On Windows, PlayerPrefs are stored in HKCU\Software\Unity\UnityEditor\ExampleCompanyName\ExampleProductName key. Windows 10 uses the application’s PlayerPrefs names. For example, Unity adds a DeckBase string and converts it into DeckBase_h3232628825. The application ignores the extension.
Unity stores PlayerPrefs in a local registry, without encryption. Do not use PlayerPrefs data to store sensitive data.