[Unity] Where’s PlayerPrefs & dataPath location in different platform?


PlayerPrefs

Windows:
HKEY_CURRENT_USER/Software/CompanyName/AppName

Mac:
~/Library/Preferences/BundleId.plist

Android:
/data/data/AppName/shared_prefs/AppName.xml

iOS:
/Apps/AppName/Library/Preferences/AppName.plist

There are 4 paths in Application Component:

1. dataPath:

Windows & Mac:
/Project Path/Assets/

Android:
data/app/BundleId.apk

iOS:
/private/var/mobile/Containers/Bundle/Application/Random Code/AppName.app/Data

2. streamingAssetsPath:

Windows & Mac:
/Project Path/Assets/StreamingAssets/

Android:
jar:file:///data/app/BundleId.apk/assets

iOS:
/private/var/mobile/Containers/Bundle/Application/Random Code/AppName.app/Data/Raw

3. persistentDataPath:

Windows:
/Users/UserName/AppData/LocalLow/CompanyName/AppName

Mac:
/Users/UserName/Library/Application Support/AppName/

Android:
data/data/BundleId/files

iOS:
/var/mobile/Containers/Bundle/Application/Random Code/Documents

4. temporaryCachePath:

Windows:
/Users/UserName/AppData/Local/Temp/CompanyName/AppName

Mac:
/var/folders/Random Path/CompanyName/AppName

Android:
/data/data/BundleId/cache

iOS:
/var/mobile/Containers/Data/Application/Random Code/Library/Caches




歡迎您留言與分享!(Welcome for comments or sharing!)

Related Post:

Tagged on: