- Код: Выделить всё
public class XmlSoundLoader
{
static public SoundData LoadSounds(string path)
{
SoundData newList;
TextAsset ta = (TextAsset)Resources.Load(path);
XmlSerializer s = new XmlSerializer(typeof(SoundData));
TextReader r = new StreamReader(new MemoryStream(ta.bytes));
newList = (SoundData)s.Deserialize(r);
r.Close();
return newList;
}
}
на Deserialize пишет 'InvalidOperationException: " is not a valid value for UnityEngine. HideFlags'