Search Unity

XML SERIALIZATION ERROR IN UNITY IN WINDOWS 8 BUILD

Discussion in 'Editor & General Support' started by tech247, Oct 18, 2014.

  1. tech247

    tech247

    Joined:
    Jul 2, 2013
    Posts:
    60
    We are working on some Unity project ( Music Instrument Development) in which we want to record the playable instrument file and in which we are able to Generate xml file but it is of 0 kb, its having problem during the Recorded file which is of 0 KB which i think the file have not bee saved.

    Please Give suggestions to problem. Also see the below link, which we have taken as reference.
    http://wiki.unity3d.com/index.php?title=Saving_and_Loading_Data:_XmlSerializer

    Please solve on urgent basis. Please see the Error Screenshot,

    Thanks
    tech247
     

    Attached Files:

  2. billykater

    billykater

    Joined:
    Mar 12, 2011
    Posts:
    329
    Please post the code and the xml file.

    From the error message it seems that TOKCollection which is the root element in the xml isn't the expected one. The XmlSerializer will by default use the class name as the root element, if you use XmlRoot(..) that is the expected name of the xml element.