[Question]Game Serialization

Hello. I would like to know what are my best options to serialize my game state in a byte[ ] in order to save it with google play services (cloud save).
I was thinking about Bson, but i am not sure how flexible it is if i have to change my saveClass structure in the future, or how fast it is.

Thanks!

Never tried it myself, but have a look at FlatBuffers from Google: GitHub - google/flatbuffers: FlatBuffers: Memory Efficient Serialization Library
It has .NET bindings, and supposed to be really quick.

Yes, FlatBuffers was my dreamy Serialization plan, but i didn’t find information online of anyone using it with Unity, so i assumed the implementation was tricky. I will take a look at it again, thanks.

What does your saveClass look like? If you have an example (code) I can serialize it to BSON with my JSON .NET port and see how it works for you and give you an example.

I am using protobuf-net now and it seems to be working good. I didn’t know how to integrate flatbuffers (i didn’t read the whole documentation anyway so…). I don’t know if Bson is faster (I don’t need human readable data serialization) and i was thinking about using your asset which have great reviews, but i will stay with protobufs for now.
Thanks Dustin, and i will take Json-net in mind if something happens.

Sure no problem! If you ever do decide just ping me and I’ll test your scenario first.