private void StartLoadFromHTTP()
 {
     this.url = AssetBundleNaming.GetAssetBundleUrl(this.assetBundleDiskCache.BaseUrl, this.AssetBundleInfo.Filename);
     if (this.loadFromHttpAttempts < RELOAD_FROM_HTTP_ATTEMPTS)
     {
         this.url = $"{this.url}?rnd={Random.value}";
     }
     Console.WriteLine("Start download url: {0}", this.url);
     this.wwwLoader = new WWWLoader(new WWW(this.url));
     this.wwwLoader.MaxRestartAttempts = 0;
     this.State = AssetBundleDiskCacheState.LOADING_FROM_HTTP;
 }
        public void HandleBundleLoadComplete(LoadCompleteEvent e, AssetBundleLoadingNode node, [JoinAll] AssetBundleDatabaseNode dbNode)
        {
            AssetBundleLoadingComponent assetBundleLoading   = node.assetBundleLoading;
            AssetBundleDiskCache        assetBundleDiskCache = dbNode.assetBundleDiskCache.AssetBundleDiskCache;
            AssetBundleInfo             info = node.assetBundleLoading.Info;

            if (!info.IsCached)
            {
                this.LogDownloadInfoIfBundleIsBig(assetBundleLoading, AssetBundleNaming.GetAssetBundleUrl(assetBundleDiskCache.BaseUrl, info.Filename), info.Size);
                info.IsCached = true;
            }
            this.ReleaseLoadingChannel(node.Entity);
        }
        protected override void Activate()
        {
            this.dbEntity = EngineService.Engine.CreateEntity("AssetBundleDatabase");
            bool   flag    = true;
            string baseUrl = (InitConfiguration.Config.ResourcesUrl + "/" + BuildTargetName.GetName()).Replace("{DataPath}", Application.dataPath);
            string str2    = !"LATEST".Equals(InitConfiguration.Config.BundleDbVersion) ? ("-" + InitConfiguration.Config.BundleDbVersion) : string.Empty;
            string url     = !flag?AssetBundleNaming.GetAssetBundleUrl(baseUrl, AssetBundleNaming.DB_PATH + str2) : (((Application.platform != RuntimePlatform.WindowsPlayer) ? "file://" : "file:///") + Application.dataPath + "/" + AssetBundleNaming.DB_FILENAME);

            WWWLoader loader = new WWWLoader(new WWW(url))
            {
                MaxRestartAttempts = 0
            };

            this.dbLoader = loader;
            BaseUrlComponent component = new BaseUrlComponent {
                Url = baseUrl + "/"
            };

            this.dbEntity.AddComponent(component);
        }