c# - Using [Serializable] with mscorlib (Unity) -


i'm building ios game using unity , in docs optimisation, says:

don’t use lives in system.dll or system.xml.dll in code. these libraries not compatible micro mscorlib. 

here's link page.

in code, save game data have class so:

[serializable] class generalgamedata {     public bool mutemusic;     public bool mutesoundfx;     public bool mutevibration;     public int highestscoreachieved; } 

which requires:

using system; 

when run game, seems ok mscorlib use nasty crash, crash kills unity every , again , game @ random points. suspect might this.

can point me in right direction how save serialized data micro mscorlib?

cheers.

you can have @ mono compatibility reference see elements not available in micro mscorlib.

you'll notice serializableattribute (namespace system, assembly mscorlib) available in .net 2.0, 2.0 subset, web player , micro. use of [serializable] should not @ fault here. however, actual serialization code may indirectly rely on not available in micro mscorelib. can use .net reflector inspect serializer code verify.

you can have here ideas on how save game data (as of issues may encounter around serialization in general).


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -