Does anyone know whether Unity (through Mono?) provides access to the Windows registry?
I am looking for a place to save game data, without forcing the user to go through a file chooser. On the Mac I can drop files somewhere under $HOME/Library/, and on Windows I would store the game state in the registry. (Incidentally, how do I learn the location of $HOME from within Unity?)
Assuming the registry cannot be accessed from Unity, does anyone know of any pseudo-standard game save locations under Windows? (If “My Documents,” then how would Unity find that folders absolute file path?)
Is there is a solution that doesn’t require a C++ plugin? Because that seems like you are just dodging around the question, telling someone how easy they could do it with a Pro-only feature, which is kinda rude.
The question is about windows deployment, so one can safely assume to have the Pro version.
As far as i can see you can only write to the registry from C# directly using p-invoke which is probably harder than writing a c plugin.
You could of course just put a huge string into the registry using PlayerPrefs.
The home directory is not nessesarily always in /Users/$USER, but that is the system default and most people (i.e. 99.99% of all users) will keep it that way. (An example of users with home in a different place are network users.)
Why not just use PlayerPrefs (assuming the functionality you need is enough)? On windows, they are stored in registry (based on your company/product name in player settings).