/// <summary> /// 更新文件 /// </summary> /// <returns></returns> static IEnumerator DownLoadFile() { UpdateDateCallBack(HotUpdateStatusEnum.DownLoadingMd5File, GetHotUpdateProgress(true, false, 0)); //取得服务器版本文件 WWW www = new WWW(s_Md5FileDownLoadPath); Debug.Log("服务器获取MD5文件 :" + s_Md5FileDownLoadPath); //yield return www; while (!www.isDone) { UpdateDateCallBack(HotUpdateStatusEnum.DownLoadingMd5File, GetHotUpdateProgress(true, false, www.progress)); yield return(new WaitForEndOfFrame()); } if (www.error != null && www.error != "") { //下载失败 Debug.LogError("MD5 DownLoad Error " + www.error); UpdateDateCallBack(HotUpdateStatusEnum.Md5FileDownLoadFail, GetHotUpdateProgress(true, false, 0)); yield break; } m_Md5FileCatch = www.text; UpdateDateCallBack(HotUpdateStatusEnum.DownLoadingMd5File, GetHotUpdateProgress(true, false, 1)); ResourcesConfigStruct serviceFileConfig = ResourcesConfigManager.AnalysisResourcesConfig2Struct(www.text); ResourcesConfigStruct localFileConfig = ResourcesConfigManager.AnalysisResourcesConfig2Struct(ResourcesConfigManager.ReadResourceConfigContent()); s_downLoadList = new List <ResourcesConfig>(); CheckBundleList(serviceFileConfig.relyList, localFileConfig.relyList); CheckBundleList(serviceFileConfig.bundleList, localFileConfig.bundleList); yield return(StartDownLoad()); }