Exemple #1
0
        private bool RunThread(PatchBundle patchBundle)
        {
            string     filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
            ThreadInfo info     = new ThreadInfo(filePath, patchBundle);

            return(ThreadPool.QueueUserWorkItem(new WaitCallback(VerifyInThread), info));
        }
Exemple #2
0
        public BundleInfo ConvertToDownloadInfo(PatchBundle patchBundle)
        {
            // 注意:资源版本号只用于确定下载路径
            string     remoteMainURL     = GetPatchDownloadMainURL(patchBundle.Hash);
            string     remoteFallbackURL = GetPatchDownloadFallbackURL(patchBundle.Hash);
            BundleInfo bundleInfo        = new BundleInfo(patchBundle, BundleInfo.ELoadMode.LoadFromRemote, remoteMainURL, remoteFallbackURL);

            return(bundleInfo);
        }
Exemple #3
0
        private static BundleInfo ConvertToUnpackInfo(PatchBundle patchBundle)
        {
            // 注意:我们把流加载路径指定为远端下载地址
            string streamingPath = PathHelper.MakeStreamingLoadPath(patchBundle.Hash);

            streamingPath = PathHelper.ConvertToWWWPath(streamingPath);
            BundleInfo bundleInfo = new BundleInfo(patchBundle, BundleInfo.ELoadMode.LoadFromRemote, streamingPath, streamingPath);

            return(bundleInfo);
        }
Exemple #4
0
 public ThreadInfo(string filePath, PatchBundle bundle)
 {
     FilePath = filePath;
     Bundle   = bundle;
 }
        public static bool CheckContentIntegrity(PatchBundle patchBundle)
        {
            string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);

            return(CheckContentIntegrity(filePath, patchBundle.SizeBytes, patchBundle.CRC));
        }