how to serialize unity variables? (Sprite, Image ...)


currently i am doing C# serialization to save and load player data.

and i am following this tutorial

but how can i serialize Sprite?

edit#1: anyone know can i serialize a whole class? if i have a class full of variables how can i save all of them together instead of one by one

Bump! Recently we released a serialization plugin which exactly does what you are looking for. Meet Runtime Serialization for Unity, fast and efficient tool to serialize c# objects as well as Unity objects like GameObject, MonoBehaviours. For compete list of support types, please check this 2.