update runtime code
移除了ILocationServices接口类。 增加了bool CheckLocationValid(string location)方法。
This commit is contained in:
@@ -147,6 +147,23 @@ namespace YooAsset
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 尝试映射为资源路径
|
||||
/// </summary>
|
||||
public string TryMappingToAssetPath(string location)
|
||||
{
|
||||
if (string.IsNullOrEmpty(location))
|
||||
return string.Empty;
|
||||
|
||||
if (_locationToLower)
|
||||
location = location.ToLower();
|
||||
|
||||
if (AssetPathMapping.TryGetValue(location, out string assetPath))
|
||||
return assetPath;
|
||||
else
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取主资源包
|
||||
/// 注意:传入的资源路径一定合法有效!
|
||||
|
||||
@@ -66,6 +66,10 @@ namespace YooAsset
|
||||
{
|
||||
return _simulatePatchManifest.MappingToAssetPath(location);
|
||||
}
|
||||
string IBundleServices.TryMappingToAssetPath(string location)
|
||||
{
|
||||
return _simulatePatchManifest.TryMappingToAssetPath(location);
|
||||
}
|
||||
string IBundleServices.GetPackageName()
|
||||
{
|
||||
return _simulatePatchManifest.PackageName;
|
||||
|
||||
@@ -392,6 +392,10 @@ namespace YooAsset
|
||||
{
|
||||
return LocalPatchManifest.MappingToAssetPath(location);
|
||||
}
|
||||
string IBundleServices.TryMappingToAssetPath(string location)
|
||||
{
|
||||
return LocalPatchManifest.TryMappingToAssetPath(location);
|
||||
}
|
||||
string IBundleServices.GetPackageName()
|
||||
{
|
||||
return LocalPatchManifest.PackageName;
|
||||
|
||||
@@ -117,6 +117,10 @@ namespace YooAsset
|
||||
{
|
||||
return _appPatchManifest.MappingToAssetPath(location);
|
||||
}
|
||||
string IBundleServices.TryMappingToAssetPath(string location)
|
||||
{
|
||||
return _appPatchManifest.TryMappingToAssetPath(location);
|
||||
}
|
||||
string IBundleServices.GetPackageName()
|
||||
{
|
||||
return _appPatchManifest.PackageName;
|
||||
|
||||
Reference in New Issue
Block a user