Synchronize playerprefs in universal app

in an Universal app How can i synchronize playerprefs between windows phone and windows store app? Is there a way without using external services or plugins?

You can use the roaming settings to do this. As long as your game has the same package name on both stores (which it will automatically if you build a Universal App) roaming settings/data is automatically synced between Windows and Windows Phone (though the user can disable this).

I’m not 100% sure you can do this without a plugin, but I will experiment with it later. You should be able to simply read and write with the native WinRT isolated storage settings using #if UNITY_WINRT (you’d do this INSTEAD of writing to the playerprefs.

Assuming this is possible you can just make a wrapper to read and write player prefs and use different behavior for Windows platforms, but default to Unity’s player prefs for any other platforms.

every file on isolated storage is automatically synchronized or is there a specific folder to do that?

I’m not 100% sure about the details, but it’s only the roaming folder that is synchronized, and I think there is a data limit (quite a small one). I think it’s only intended for settings and small bits of data, not files.

1 Like

ok thanks