private bool RunThread(PatchBundle patchBundle) { string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash); ThreadInfo info = new ThreadInfo(filePath, patchBundle); return(ThreadPool.QueueUserWorkItem(new WaitCallback(VerifyInThread), info)); }
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); }
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); }
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)); }