update query services interface

内置文件和分发文件查询方法参数里增加了文件哈希值
pull/229/head
hevinci 2023-12-21 16:10:54 +08:00
parent 47962424eb
commit 0e29e9823d
5 changed files with 566 additions and 547 deletions

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ namespace YooAsset
{
if (_deliveryQueryServices == null)
return false;
return _deliveryQueryServices.Query(PackageName, packageBundle.FileName);
return _deliveryQueryServices.Query(PackageName, packageBundle.FileName, packageBundle.FileCRC);
}
private bool IsCachedPackageBundle(PackageBundle packageBundle)
{
@ -83,7 +83,7 @@ namespace YooAsset
}
private bool IsBuildinPackageBundle(PackageBundle packageBundle)
{
return _buildinQueryServices.Query(PackageName, packageBundle.FileName);
return _buildinQueryServices.Query(PackageName, packageBundle.FileName, packageBundle.FileCRC);
}
#region IPlayMode接口

View File

@ -67,7 +67,7 @@ namespace YooAsset
// 查询相关
private bool IsBuildinPackageBundle(PackageBundle packageBundle)
{
return _buildinQueryServices.Query(PackageName, packageBundle.FileName);
return _buildinQueryServices.Query(PackageName, packageBundle.FileName, packageBundle.FileCRC);
}
#region IPlayMode接口

View File

@ -1,11 +1,15 @@

namespace YooAsset
{
public interface IBuildinQueryServices
{
/// <summary>
/// 查询是否为应用程序内置的资源文件
/// </summary>
bool Query(string packageName, string fileName);
}
public interface IBuildinQueryServices
{
/// <summary>
/// 查询是否为应用程序内置的资源文件
/// </summary>
/// <param name="packageName">包裹名称</param>
/// <param name="fileName">文件名称(包含文件的后缀格式)</param>
/// <param name="fileCRC">文件哈希值</param>
/// <returns>返回查询结果</returns>
bool Query(string packageName, string fileName, string fileCRC);
}
}

View File

@ -1,16 +1,23 @@

namespace YooAsset
{
public interface IDeliveryQueryServices
{
/// <summary>
/// 查询是否为开发者分发的资源文件
/// </summary>
bool Query(string packageName, string fileName);
public interface IDeliveryQueryServices
{
/// <summary>
/// 查询是否为开发者分发的资源文件
/// </summary>
/// <param name="packageName">包裹名称</param>
/// <param name="fileName">文件名称(包含文件的后缀格式)</param>
/// <param name="fileCRC">文件哈希值</param>
/// <returns>返回查询结果</returns>
bool Query(string packageName, string fileName, string fileCRC);
/// <summary>
/// 获取分发资源文件的路径
/// </summary>
string GetFilePath(string packageName, string fileName);
}
/// <summary>
/// 获取分发资源文件的路径
/// </summary>
/// <param name="packageName">包裹名称</param>
/// <param name="fileName">文件名称(包含文件的后缀格式)</param>
/// <returns>返回资源文件的路径</returns>
string GetFilePath(string packageName, string fileName);
}
}