Windows 8.1 Store app, how to make serialization and deserialization?

Hello!

Please help me. How to make save and load data from local disk in Windows 8.1 Store app?

This way dosn’t work:
Using System.Runtime.Serialization.Formatters.Binary;
Error: The type or namespace name ‘Formatters’ does not exist in the namespace ‘System.Runtime.Serialization’ (are you missing an assembly reference?)

Checkout this example - https://code.msdn.microsoft.com/windowsapps/Serializers-for-Windows-8-f82e2d88 , but because it uses WinRT API, you’ll have to make a plugin to make this work.

But maybe you don’t even need this, maybe simple load/save to file is enough for you, could you explain what are you trying to achieve?

Yes, I think simple load/save to file is enough for me, how realize this for Windows Store app?
I have 10 levels. I’m trying realize loading scene(level) from the main screen using previous level(score, life) saved data.

Well, the easiest way would be simply to use Unity - Scripting API: PlayerPrefs.

Or you can use - Unity - Scripting API: File

1 Like

Thank you. I’ll try this.