Editorprefs randomly lost

Hi everyone,

my Unity editor seems to randomly lose my EditorPrefs. For example today, I started Unity as always, suddenly Odin Inspector and Rider Flow asked me to confirm their EULA again, my hotkey map was back to default (it was not lost, but my custom map was not selected), Unity had forgotten about Rider being my external editor and one of my own scripts had lost its values, too - those were saved in editor prefs, that’s how I figured that must be the issue. I had issues with the EULA confirmation resetting before.

I am on Unity 2021.3.39f1 on Manjaro Linux. I checked ~/.local/share/unity3d/prefs - it exists and from a quick test gets updated, too. I guess it got reset somehow. I just have no idea how or why. Do editor prefs ever get reset? When?

Thanks in advance!

Check if any script in your project (including all packages to be sure) calls EditorPrefs.DeleteAll anywhere. If possible, inspect any DLLs with Rider too - for instance the Odin DLLs but I’d be more wary of any 3rd party assets that still, to this day, tries to “hide” its code in a DLL. Perhaps we were never meant to see it because it’s so damn ugly. :wink:

If that is not the case and the issue also occurs in other projects I’d suspect something system-wide. On Windows I would have assumed some sort of “registry cleaner” tool or similar. No idea what it could be on Linux.