From 75910b75587b4c6adff4489742d4ed8b10943887 Mon Sep 17 00:00:00 2001 From: hevinci Date: Sun, 31 Jul 2022 22:26:33 +0800 Subject: [PATCH] Update YooAssets.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加获取资源信息新方法 --- Assets/YooAsset/Runtime/YooAssets.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Assets/YooAsset/Runtime/YooAssets.cs b/Assets/YooAsset/Runtime/YooAssets.cs index b7dc14c..24bedd2 100644 --- a/Assets/YooAsset/Runtime/YooAssets.cs +++ b/Assets/YooAsset/Runtime/YooAssets.cs @@ -454,6 +454,17 @@ namespace YooAsset return _bundleServices.GetAssetInfos(tags); } + /// + /// 获取资源信息 + /// + /// 资源的定位地址 + public static AssetInfo GetAssetInfo(string location) + { + DebugCheckInitialize(); + AssetInfo assetInfo = ConvertLocationToAssetInfo(location, null); + return assetInfo; + } + /// /// 获取资源路径 ///