refactor : 重构代码

This commit is contained in:
何冠峰
2026-01-16 10:28:01 +08:00
parent 2b6e7856e7
commit b0e85017d2
100 changed files with 1042 additions and 1582 deletions
@@ -70,12 +70,12 @@ namespace YooAsset
/// <summary>
/// 自定义参数:解密服务接口的实例类
/// </summary>
public IWebDecryptionServices DecryptionServices { private set; get; }
public IWebBundleDecryptionServices BundleDecryptionServices { private set; get; }
/// <summary>
/// 自定义参数:资源清单服务类
/// </summary>
public IManifestRestoreServices ManifestServices { private set; get; }
public IManifestRestoreServices ManifestRestoreServices { private set; get; }
#endregion
@@ -97,18 +97,19 @@ namespace YooAsset
var operation = new DWSFSLoadPackageManifestOperation(this, options.PackageVersion, options.Timeout);
return operation;
}
public virtual FSClearCacheFilesOperation ClearCacheFilesAsync(PackageManifest manifest, ClearCacheFilesOptions options)
public virtual FSClearCacheFilesOperation ClearCacheFilesAsync(ClearCacheFilesOptions options)
{
var operation = new FSClearCacheFilesCompleteOperation();
return operation;
}
public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadFileOptions options)
public virtual FSDownloadFileOperation DownloadFileAsync(DownloadFileOptions options)
{
throw new System.NotImplementedException();
}
public virtual FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)
public virtual FSLoadBundleOperation LoadBundleAsync(LoadBundleOptions options)
{
if (bundle.BundleType == (int)EBuildBundleType.AssetBundle)
PackageBundle bundle = options.Bundle;
if (bundle.BundleType == (int)EBundleType.AssetBundle)
{
var operation = new DWSFSLoadAssetBundleOperation(this, bundle);
return operation;
@@ -135,13 +136,13 @@ namespace YooAsset
{
DisableUnityWebCache = Convert.ToBoolean(value);
}
else if (name == FileSystemParametersDefine.DECRYPTION_SERVICES)
else if (name == FileSystemParametersDefine.BUNDLE_DECRYPTION_SERVICES)
{
DecryptionServices = (IWebDecryptionServices)value;
BundleDecryptionServices = (IWebBundleDecryptionServices)value;
}
else if (name == FileSystemParametersDefine.MANIFEST_SERVICES)
else if (name == FileSystemParametersDefine.MANIFEST_RESTORE_SERVICES)
{
ManifestServices = (IManifestRestoreServices)value;
ManifestRestoreServices = (IManifestRestoreServices)value;
}
else
{