hi all i was wondering if there is a solution or work around for serialization of an object or struct.
i tried a few ways but get a error because i was using binary formmatter and i cant as it uses reflection.
thanks for any help you can give .
Virtual
Either XML serialization, JSON or a custom serialized will work.
I’ve used XML serialization myself. That can be a bit bloaty and cumbersome, though, depending on how much you have to serialize and how many types of things you have to serialize. I have some generic, reusable code that I am happy to share with you if you’d like. I’m not at my office now, otherwise I’d just attach it here.
Maybe I don’t understand the context but if u place [System.Serializable] above ur class won’t it serialize the object? Or does that not work for unity iOS?
That works for when saving data for a MonoBehavior into a game object that is in your scene or a prefab, statically (for a lack of a better word).