PlayerPrefs Editor
Lists, edits, deletes, and exports Unity PlayerPrefs (int / float / string).
Editor-only. Unity 2021.3+. Lives in Rivet.Editor (includePlatforms: Editor). No extra packages.
Editor window
ArTchie / Rivet / PlayerPrefs Editor
| Control | What it does |
|---|---|
| Refresh | Rebuilds the table from known keys (Windows registry + keys you loaded/added this session). |
| Export JSON | Writes <project>/RivetReports/player-prefs.json (creates the folder if needed). |
| Manual key / Load | Look up any key by name, even if it was not discovered automatically. |
| Add | Create or overwrite a key (int / float / string). |
| Table Set / Delete | Write the edited type/value, or PlayerPrefs.DeleteKey. |
Types are int, float, and string only. PlayerPrefs.Save() is called after every successful write or delete.
Batchmode (CI)
Unity -batchmode -nographics -quit -projectPath <proj> -executeMethod Rivet.PlayerPrefsEditor.RunBatch -rivet-out <file.json>
Batch is export-only unless you pass a mutate set:
… -rivet-set-key volume -rivet-set-type float -rivet-set-value 0.75
… -rivet-delete-key volume
| Arg | Meaning |
|---|---|
-rivet-out <file.json> |
Output path. Default: <project>/RivetReports/player-prefs.json |
-rivet-fail |
Accepted for kit consistency. Mutation errors already exit 1. Export-only exits 0. |
-rivet-set-key + -rivet-set-type + -rivet-set-value |
Write one key, then export. Type is int, float, or string. |
-rivet-delete-key |
Delete one key, then export. Fails if HasKey is false. |
Do not mix delete and set flags. Also accepts -rivet-out=file.json and -rivet-set-value=-1 (equals form is required for values that start with -).
RunBatch only calls EditorApplication.Exit when Application.isBatchMode is true. It logs count=, whether a mutation ran, and the output path.
JSON
{
"tool": "PlayerPrefsEditor",
"generatedUtc": "2026-08-18T02:00:00Z",
"productName": "MyGame",
"companyName": "MyStudio",
"count": 2,
"items": [
{ "key": "score", "type": "int", "value": 12 },
{ "key": "volume", "type": "float", "value": 0.75 }
]
}
value is a JSON number for int/float and a JSON string for string. productName / companyName come from PlayerSettings.
Notes
- Windows Editor only: known keys are read from the Unity PlayerPrefs registry locations for this project's company/product:
HKCU\Software\Unity\UnityEditor\<company>\<product>HKCU\Software\<company>\<product>
- Only value names that match Unity's
key_h<hash>pattern and passPlayerPrefs.HasKeyare listed. Subkeys are never enumerated. Unrelated registry trees are never opened. - Company/product names that contain
\or/skip the registry read entirely. - macOS / Linux Editor: no automatic listing. Use Manual key or Add. Batch export may be an empty
itemsarray. - DWORD registry values are treated as
int(Unity also stores floats as DWORD; switch the type popup if needed). - Empty projects and a missing
RivetReportsfolder are fine. - Does not dump
EditorPrefs. Does not walk HKLM or sibling HKCU keys.
Source in the box: Assets/ArTchie Studios/ArTchie-Suite/com.artchie.rivet/Documentation/PlayerPrefsEditor.md