pull/418/head
何冠峰 2024-12-12 18:13:33 +08:00
parent 038a52f7fc
commit 14ea408fec
2 changed files with 26 additions and 3 deletions

View File

@ -210,10 +210,24 @@ namespace YooAsset
return BundleDic3.ContainsKey(bundleGUID);
}
/// <summary>
/// 获取所有的资源信息
/// </summary>
public AssetInfo[] GetAllAssetInfos()
{
List<AssetInfo> result = new List<AssetInfo>(AssetList.Count);
foreach (var packageAsset in AssetList)
{
AssetInfo assetInfo = new AssetInfo(PackageName, packageAsset, null);
result.Add(assetInfo);
}
return result.ToArray();
}
/// <summary>
/// 获取资源信息列表
/// </summary>
public AssetInfo[] GetAssetsInfoByTags(string[] tags)
public AssetInfo[] GetAssetInfosByTags(string[] tags)
{
List<AssetInfo> result = new List<AssetInfo>(100);
foreach (var packageAsset in AssetList)

View File

@ -339,6 +339,15 @@ namespace YooAsset
return IsNeedDownloadFromRemoteInternal(assetInfo);
}
/// <summary>
/// 获取所有的资源信息
/// </summary>
public AssetInfo[] GetAllAssetInfos()
{
DebugCheckInitialize();
return _playModeImpl.ActiveManifest.GetAllAssetInfos();
}
/// <summary>
/// 获取资源信息列表
/// </summary>
@ -347,7 +356,7 @@ namespace YooAsset
{
DebugCheckInitialize();
string[] tags = new string[] { tag };
return _playModeImpl.ActiveManifest.GetAssetsInfoByTags(tags);
return _playModeImpl.ActiveManifest.GetAssetInfosByTags(tags);
}
/// <summary>
@ -357,7 +366,7 @@ namespace YooAsset
public AssetInfo[] GetAssetInfos(string[] tags)
{
DebugCheckInitialize();
return _playModeImpl.ActiveManifest.GetAssetsInfoByTags(tags);
return _playModeImpl.ActiveManifest.GetAssetInfosByTags(tags);
}
/// <summary>