Hey guys,
I’m importing a large XML file (about 100kb) that’s downloaded from the web using XMLSerializer and I’m running into an issue where the string appears to become truncated, causing an invalid XML file to be passed through to the serializer.
I can debug.log each line of the entire XML file from WWW.text without any problems, seems to be an issue where it’s passed into my serializer function (below) as a String. It’s sent straight in as MeshXML.Load ( WWW.text );
It’s just serializing stuff needed for a mesh (2 list of Vector3s, 1 list of Vector2s and 1 list of ints).
public static function LoadFromText ( text : String ):MeshXML {
var serializer : XmlSerializer = new XmlSerializer ( typeof ( MeshXML ) );
return serializer.Deserialize ( new StringReader ( text ) ) as MeshXML;
}
Smaller files do work.
Any thoughts on how to get around this?
edit: I should also add that loading the same file from disk via FileStream (bypassing the file contents being passed in via a string) gives the same issues.