Exemplo n.º 1
0
    IEnumerator Load()
    {
        print(fileName + ".xml");

        WWW www = new WWW(fileName + ".xml");

        yield return(www);

        if (www.isDone)
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(XmlSaver.UTF8ByteArrayToString(www.bytes).Trim());

            if (OnLoadFinish != null)
            {
                OnLoadFinish(xmlDoc);
            }
            Destroy(this);
        }
    }