예제 #1
0
 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));
 }
예제 #2
0
        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);
            }
        }