优化了资源定位不正确导致的错误报告方式。 YooAssets.ProcessOperation()重命名为YooAssets.StartOperation() YooAssets.GetBundleInfo()已经移除方法。 YooAssets.IsNeedDownloadFromRemote()新增加方法。
27 lines
622 B
C#
27 lines
622 B
C#
|
|
namespace YooAsset
|
|
{
|
|
public class DefaultLocationServices : ILocationServices
|
|
{
|
|
private readonly string _resourceRoot;
|
|
|
|
public DefaultLocationServices(string resourceRoot)
|
|
{
|
|
if (string.IsNullOrEmpty(resourceRoot) == false)
|
|
_resourceRoot = PathHelper.GetRegularPath(resourceRoot);
|
|
}
|
|
|
|
string ILocationServices.ConvertLocationToAssetPath(string location)
|
|
{
|
|
if (string.IsNullOrEmpty(_resourceRoot))
|
|
{
|
|
return YooAssets.MappingToAssetPath(location);
|
|
}
|
|
else
|
|
{
|
|
string tempLocation = $"{_resourceRoot}/{location}";
|
|
return YooAssets.MappingToAssetPath(tempLocation);
|
|
}
|
|
}
|
|
}
|
|
} |