//以下、対応は見送り #if false IEnumerator updateAssetBundles(string remoteUrl) { string path = Path.Combine(Application.persistentDataPath, "current_version_infos.json"); Dictionary <string, Info> currentMergedInfo = readCurrentVersionInfos(path); Dictionary <string, Info> updateTargets = retrieveUpdateTarget(mergedVersionInfos, currentMergedInfo); // 更新が無ければ何もしない if (updateTargets.Count == 0) { Debug.Log("アセットバンドルの更新無し"); yield break; } // 更新前に一度削除 deleteCurrentVersionInfos(path); //アセットバンドルの更新 foreach (var key in updateTargets.Keys) { if (updateTargets[key].type == Info.ResourceType.LOCAL) { continue; } //ストレージのキャッシュに乗せる ABVersionInfo.Element info = updateTargets[key].element; string uri = combineUrl(remoteUrl, info.name); using (var request = new UnityWebRequest(uri, UnityWebRequest.kHttpVerbGET)) { request.downloadHandler = new DownloadHandlerAssetBundle(path, info.version, 0); yield return(request.SendWebRequest()); Debug.Log("[" + path + "] is downloaded"); //AssetBundle assetBundle = DownloadHandlerAssetBundle.GetContent(request); } } Debug.Log("アセットバンドルの更新完了"); // マージ済みの情報を書き込む writeCurrentVersionInfos(path, mergedVersionInfos); }
public Info(ABVersionInfo.Element element, ResourceType type) { this.element = element; this.type = type; }