mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 03:28:47 +00:00
Add load all asset method.
增加新的资源加载方法:加载资源对象所属资源包里的所有资源。
This commit is contained in:
@@ -173,7 +173,7 @@ namespace YooAsset
|
||||
/// <summary>
|
||||
/// 获取资源信息列表
|
||||
/// </summary>
|
||||
public static AssetInfo[] GetAssetsInfoByTag(PatchManifest patchManifest, string[] tags)
|
||||
public static AssetInfo[] GetAssetsInfoByTags(PatchManifest patchManifest, string[] tags)
|
||||
{
|
||||
List<AssetInfo> result = new List<AssetInfo>(100);
|
||||
foreach (var patchAsset in patchManifest.AssetList)
|
||||
@@ -189,5 +189,20 @@ namespace YooAsset
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取资源信息列表
|
||||
/// </summary>
|
||||
public static AssetInfo[] GetAssetsInfoByBundleName(PatchManifest patchManifest, string bundleName)
|
||||
{
|
||||
List<AssetInfo> result = new List<AssetInfo>(100);
|
||||
foreach (var patchAsset in patchManifest.AssetList)
|
||||
{
|
||||
string tempName = patchManifest.GetBundleName(patchAsset.AssetPath);
|
||||
if (tempName == bundleName)
|
||||
result.Add(new AssetInfo(patchAsset.AssetPath));
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user