Why do you care what names they are in the registry? PlayerPrefs doesn’t claim the entries in the registry are named exactly as the key you specify, just that when you request the value by the same key you saved as that you get the correct value back.
Where does Unity ever state that the name of the registry entry is the name of the provided key?
That’s all you really need to know. You don’t need to care how PP stores values, as long as it works.
If you want to get a file that’s more human-readable for whatever reason, you can serialize values yourself, maybe use JsonUtility, something like that. PlayerPrefs is best for the most basic “fire and forget” sort of permanent data.
Speaking of which, this really looks like a poor usage of PlayerPrefs. What are you actually trying to do with this? It looks like you’d probably be better offer with JsonUtility regardless.
I’m trying to send some values from Unity to Labview. I can figure using txt file at first, but It will grow too large over time. And I’m afraid that may make slow all system. So I think a way to send value not saving a file or record will be better and I used PP.
After finish initial configure of whole system I’ll try what you recommend. Thank you!
Yeah, you definitely need to learn to write files yourself - it’s not difficult (and about a hundred times easier than trying to reverse-engineer the PlayerPrefs file format).
May I ask why regsitry is not recommended if you don’t mind?.. I alread read about hooking issue from blogs but Vive used that on their SDK. So I thought that might be safe sending internal program to internal. Thanks for reply!
System efficiency. Microsoft recommends storing your data in external files and referencing the files in a registry entry when you need to store more than 2KB. Because storing large amounts of data within the registry will adversely affect system performance.
I dont mean to bother you keep asking… Just I need to clear reasons and why/why not to report a reason why I choose any method to my research chief(Also comparison with other methods…).
And personaly a little bit curious why registry method is not recommended (System efficiency - Thx Ryiah!) 'cause Vive SDK sends rotation data to registry.
Again I really hope you not to be irritated. And Thanks for link!.. I’ll refer them.
The registry is a complex mechanism with lots of features you probably don’t need. This is the best argument against it. I’m sure there are also many constraints to using it, such as the one Ryiah linked.
Also, PlayerPrefs doesn’t say anything about the registry, so you’re breaking encapsulation by even discovering that it’s writing there. If you want to control where you’re writing to in the registry, use the correct tools.
What are you trying to accomplish in connecting Labview with Unity? I use both myself, and they are great programs. Passing data via the file system is rarely recommended, and is slow. How frequently is the data changing, and what is the data? And you mentioned “Yoda”, who is that? Someone told you to exchange data via the Registry? I suspect you are making references out of context. The registry is used for app-specific values for data that rarely changes, like storing the most recent used file list that many programs use. This may help http://www.ni.com/tutorial/10060/en/