mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-14 19:40:47 +00:00
style : file system code style
This commit is contained in:
@@ -126,7 +126,7 @@ namespace YooAsset
|
||||
public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadFileOptions options)
|
||||
{
|
||||
// 注意:业务层的解压下载器会依赖内置文件系统的下载方法
|
||||
options.ImportFilePath = GetBuildinFileLoadPath(bundle);
|
||||
options.LocalFilePath = GetBuildinFileLoadPath(bundle);
|
||||
return _unpackFileSystem.DownloadFileAsync(bundle, options);
|
||||
}
|
||||
public virtual FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace YooAsset
|
||||
|
||||
// 创建新的下载器
|
||||
DefaultDownloadFileOperation newDownloader;
|
||||
if (string.IsNullOrEmpty(options.ImportFilePath))
|
||||
if (string.IsNullOrEmpty(options.LocalFilePath))
|
||||
{
|
||||
// 远端下载地址
|
||||
options.MainURL = _fileSystem.RemoteServices.GetRemoteMainURL(bundle.FileName);
|
||||
@@ -107,7 +107,7 @@ namespace YooAsset
|
||||
else
|
||||
{
|
||||
// 注意:把本地文件路径指定为可下载地址
|
||||
options.MainURL = DownloadSystemHelper.ConvertToWWWPath(options.ImportFilePath);
|
||||
options.MainURL = DownloadSystemHelper.ConvertToWWWPath(options.LocalFilePath);
|
||||
options.FallbackURL = options.MainURL;
|
||||
|
||||
// 创建新的下载器
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace YooAsset
|
||||
public string FallbackURL { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 导入的本地文件路径
|
||||
/// 拷贝的本地文件路径
|
||||
/// </summary>
|
||||
public string ImportFilePath { set; get; }
|
||||
public string LocalFilePath { set; get; }
|
||||
|
||||
public DownloadFileOptions(int failedTryAgain, int timeout)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace YooAsset
|
||||
public FSDownloadFileOperation CreateDownloader(int failedTryAgain, int timeout)
|
||||
{
|
||||
DownloadFileOptions options = new DownloadFileOptions(failedTryAgain, timeout);
|
||||
options.ImportFilePath = _importFilePath;
|
||||
options.LocalFilePath = _importFilePath;
|
||||
return _fileSystem.DownloadFileAsync(Bundle, options);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace YooAsset
|
||||
|
||||
/// <summary>
|
||||
/// 本地文件拷贝服务类
|
||||
/// 备注:包体内文件拷贝,沙盒内文件导入都会触发该服务!
|
||||
/// </summary>
|
||||
public interface ICopyLocalFileServices
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user