// 开始更新 private void StartHotUpdate() { // 初始化数据 _updateSetting = null; _updateConfig = null; _latest = null; _latestVersion = null; _updateList = null; _updateSize = 0; _downloadedSize = 0; _downloader = null; _updateStatus = STATUS_WORK; StartCoroutine(HotUpdate()); }
// 0.加载更新配置文件 private IEnumerator LoadUpdateConfig(string url) { // Debug.Log("Updater.LoadUpdateConfig " + url); WWW downloader = new WWW(url); yield return(downloader); if (downloader.error != null) { yield break; } try { _updateConfig = JsonMapper.ToObject <UpdateConfig>(downloader.text); } catch (Exception) { // Debug.Log(e.Message); _updateConfig = null; } }