private List <AssetVersion> FindLocalVersions() { List <AssetVersion> versions = new List <AssetVersion>(); string[] paths = Directory.GetFiles(Application.dataPath, "AssetVersion.xml", SearchOption.AllDirectories); foreach (string path in paths) { string localXML = File.ReadAllText(path); AssetVersion version = AssetVersion.ParseXML(localXML); if (version != null) { versions.Add(version); } } return(versions); }
private void WebClientCompleted(object sender, DownloadStringCompletedEventArgs e) { if (e.Cancelled || e.Error != null) { if (e.Error != null) { Debug.Log("dl complete error: " + e.Error); } HandleFailedDownload(); } else { AssetVersion remote = AssetVersion.ParseXML(e.Result); if (remote == null) { HandleFailedDownload(); } else { HandleFinishedDownload(remote); } } }