Looking For A Solution For Sharing PlayerPrefs Between 2 Different Apps

Hey everyone. I am looking for a PlayerPrefs solution for sharing playerprefs between two different Apps. One being WebGL and the other being a windows EXE build. If anyone has a solution for this with either Unitys or an asset store solution, or a custom code based solution, it would be very much appreciated.

I need to communicate some simple instructions between a WebGL build and a Unity EXE, and i figure since WebGL cannot write any files but PlayerPrefs, there may not be any other way(Please enlighten me if I’m wrong ).

Really the best way to so this would be to just run your own sever and expose a api to both the webgl and the standalone to access.

1 Like

Yes I have considered this. But it just seems really strange that I can’t find any solution for this. Why can’t we customize file locations or manually choose Unitys Playerprefs? It seems very limiting to a developer.

Well on standalone you can skip player prefs all together and use your own data formats. On webgl since it can’t access the file system I’m assuming it is using cookies or the persistent js storage provided by the browser.

There is a very good reason for this, you don’t want any site that has client side scripting to be able to fuck with peoples files.

1 Like

Security. Security. Security.

Otherwise I could write a webplayer game that could scan through all you files, extract personal details, and then move all of your money into my bank account in Nigeria. And max out your credit cards doing the same thing. Then to cover my tracks I’ll write 0 to every byte on your hard drive. And to top it off I’ll start running a set of infinite loop running on every core on your CPU, and remove temperature protection so your PC melts.

And that’s one of the nicest things a malicious person can do with your computer with full access. That’s why we like sandboxing.

So I would be able to create and save variables on WebGL and access them on a unity EXE with this…?

yes

ParseObject gameScore = new ParseObject("GameScore");
gameScore["score"] = 1337;
gameScore["playerName"] = "Sean Plott";
Task saveTask = gameScore.SaveAsync();

Parse is a pretty nice backend. I’ve used it before for leaderboards and saved game data.

Thanks I will look into it. :slight_smile: