private IEnumerator FetchAssetBundle(RemoteAssetBundle bundle, RemoteAssetBundleMap assetMap) { System.Action <string, AssetBundle> callback = (error, b) => { if (!string.IsNullOrEmpty(error)) { Debug.LogError(error); } else { if (b) { assetMap.AddLoadedRemoteBundle(b); } } }; return(RemoteAssetBundleUtils.DownloadAssetBundleAsync(remoteAssetBundleEndpoint, bundle, callback)); }
private async Task FetchAllManifestsAwaitable() { UpdateProgressBar(1.0f, "Checking for New Content"); RemoteAssetBundleManifest[] manifests = new RemoteAssetBundleManifest[remoteAssetBundleMaps.Length]; RemoteAssetBundleMap map; for (int i = 0; i < remoteAssetBundleMaps.Length; i++) { map = remoteAssetBundleMaps[i]; map.Manifest = await RemoteAssetBundleUtils.GetAssetBundleManifest(remoteAssetBundleEndpoint, map.appName, verified); if (map.Manifest.bundles != null && map.Manifest.bundles.Length > 0) { newContentAvailable = true; } manifests[i] = map.Manifest; } if (OnManifestsRetrieved != null) { OnManifestsRetrieved(manifests); } }