Hello!
I know how to deserialize my class from xml TextAsset, but I am not sure how to serialize it to TextAsset.
Is writing to TextAsset possible?
Serialization code for an ordinary xml file looks like this:
static public void SerializeGameText(GameText2 my_text, TextAsset xml_file)
{
XmlSerializer s = new XmlSerializer(typeof(GameText2));
TextWriter w = new StreamWriter(@"c:\level.xml",false,Encoding.Unicode);
s.Serialize(w, my_text);
w.Close();
}
Thanks!