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); }
protected override void Activate() { if (InitConfigurationActivator.LauncherPassed) { base.Complete(); } else { string url = InitConfiguration.Config.UpdateConfigUrl.Replace("{DataPath}", Application.dataPath).Replace("{BuildTarget}", BuildTargetName.GetName()); this.wwwLoader = new WWWLoader(new WWW(url)); } }