IPlayMode.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 
  2. namespace YooAsset
  3. {
  4. internal interface IPlayMode
  5. {
  6. /// <summary>
  7. /// 当前激活的清单
  8. /// </summary>
  9. PackageManifest ActiveManifest { set; get; }
  10. /// <summary>
  11. /// 销毁文件系统
  12. /// </summary>
  13. void DestroyFileSystem();
  14. /// <summary>
  15. /// 向网络端请求最新的资源版本
  16. /// </summary>
  17. RequestPackageVersionOperation RequestPackageVersionAsync(bool appendTimeTicks, int timeout);
  18. /// <summary>
  19. /// 向网络端请求并更新清单
  20. /// </summary>
  21. UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, int timeout);
  22. /// <summary>
  23. /// 预下载指定版本的包裹内容
  24. /// </summary>
  25. PreDownloadContentOperation PreDownloadContentAsync(string packageVersion, int timeout);
  26. /// <summary>
  27. /// 清理缓存文件
  28. /// </summary>
  29. ClearCacheFilesOperation ClearCacheFilesAsync(string clearMode, object clearParam);
  30. // 下载相关
  31. ResourceDownloaderOperation CreateResourceDownloaderByAll(int downloadingMaxNumber, int failedTryAgain, int timeout);
  32. ResourceDownloaderOperation CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout);
  33. ResourceDownloaderOperation CreateResourceDownloaderByPaths(AssetInfo[] assetInfos, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain, int timeout);
  34. // 解压相关
  35. ResourceUnpackerOperation CreateResourceUnpackerByAll(int upackingMaxNumber, int failedTryAgain, int timeout);
  36. ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout);
  37. // 导入相关
  38. ResourceImporterOperation CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout);
  39. }
  40. }