15
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UnityのPlayerPrefs保存場所はEditorとビルドで異なる

Posted at

前提

Windows 10 + Unity 5.6.1f1 環境での挙動なので、他のOSやバージョンでは異なる可能性があります。

PlayerPrefsの保存場所

UnityEngine.PlayerPrefs の保存場所は、Windows環境の場合レジストリです。
ドキュメントには以下の記載があります。

On Windows, PlayerPrefs are stored in the registry under HKCU\Software\[company name]
[product name] key, where company and product names are the names set up in Project Settings.

しかし実際には、上記はビルドしたもの(Standalone)の保存場所です。
Editor上で実行した場合は以下の場所に保存されます

HKCU\Software \Unity\UnityEditor \[company name]\[product name]

ドキュメントにわざわざ「Editor/Standalone」と書いてあるのに実際には異なっている、という罠でした。

15
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?