Serialization in unity Iphone basic

Hey, i'm trying to find a way to save a whole lot of savegame data. using unity iphone basic , latest version (1.7)

I've been trying several approaches. 1. First i tried to use a Binaryformatter method frmo this post : (i did a small change and instead of saving it to a file stream i save it to a memory stream, convert to Base64 and save to profileprefs)

it worked perfectly in the editor, then when i came to compile and try it out on the device i got this error: This mono runtime was configured with --enable-minimal=reflection_emit, so System.Reflection.Emit is not supported.Program received signal: SIGABRT

Reading on the matter i found this thread:

but i chose in player preferences to use .net 2.1. instead of 1.1 (p.s. do i need to do a rebuild when i change player settings?)

2. Then i tried this method with XML:

It fails when i try to serialize a class that has a hashtable in it : InvalidOperationException: There was an error reflecting field 'itemsInventory'.

I'm really stuck here, as i have dozens of classes in the game and i wouldn't want to start implementing manual serialization functions for every class. especially those ones with arrays and hashtables.

what can i do ? any ideas?


You won't be able to serialize generics / dictionary objects in Unity iPhone 1.7. There is mention this will be supported when 3.0 comes out.

Has there been any word of the offical support of this. We're getting an issue at runtime serializing some data in the 3.0 beta

bump,… anybody have any luck serializing hashtable or generics in unity 3.5 ios ?