We are porting one of our games to Steam. When uploaded our first test build we have realized that the uninstall feature does not clean registry for PlayerPrefs neither empty the Persistent Data folder.
Is there any way to configure this on SteamWorks console or Unity itself? Any workaround or clue is welcome.
Unity doesn’t provide a direct way to uninstall PlayerPrefs, although that would be a really nice feature
Instead you’ll have to manually delete the key(s) from the Windows Registry as part of you uninstall script, in which you’ll probably want some 3rd part tool to accomplish (sorry I don’t know how uninstalling works with Steam).
Theoretically you could use Unity to build an “uninstall app” which calls PlayerPrefs.DeleteAll() but that’s probably more trouble than it’s worth.
Looking at the SteamWorks documentation it is possible to include an install script to perform certain actions (e.g. run a batch file) on uninstall.
This could be used to both remove the registry keys that PlayerPrefs writes to, as well as clearing out certain folders.