diff --git a/Assets/YooAsset/Runtime/YooAssets.cs b/Assets/YooAsset/Runtime/YooAssets.cs index 32dbe86..9b8c325 100644 --- a/Assets/YooAsset/Runtime/YooAssets.cs +++ b/Assets/YooAsset/Runtime/YooAssets.cs @@ -426,6 +426,17 @@ namespace YooAsset DebugCheckInitialize(); return _bundleServices.GetAssetInfos(tags); } + + /// + /// 获取资源路径 + /// + /// 资源的定位地址 + /// 如果location地址无效,则返回空字符串 + public static string GetAssetPath(string location) + { + DebugCheckInitialize(); + return _locationServices.ConvertLocationToAssetPath(location); + } #endregion #region 场景加载