Esempio n. 1
0
 void CompareManifestInfo()                                                                                       //对比manifest文件
 {
     if (BundleData.Instance.local_Manifest == null)                                                              //如果说 manifest文件为空,先加载manifest
     {                                                                                                            //manifest 本身也是一个AssetBundle
         AssetBundle assetBundle = AssetBundle.LoadFromFile(BundleData.Instance.local_Path + "/" + AssetBundleConfig.local_BundleManifestName);
         BundleData.Instance.local_Manifest = assetBundle.LoadAsset <AssetBundleManifest>("AssetBundleManifest"); //这里是固定写法,你写别的会报错哦
     }
     if (BundleData.Instance.server_Manifest == null)                                                             //服务器上的manifest文件
     {
         DownLoaderEnum downLoaderEnum = new DownLoaderEnum(AssetBundleConfig.httpAddress + AssetBundleConfig.server_BundleManifestName, BundleData.Instance.deposit_DownFilePath, null);
         ThreadPool.QueueUserWorkItem(HttpUtil.Instance.HttpDownloader, downLoaderEnum);
         StartCoroutine(AwaitDownServerBundleManifestOver());
     }
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     ThreadPool.SetMaxThreads(5, 5);
     down = new DownLoaderEnum(url, path);//请求url,存放地址,存放文件名
 }