Add load all asset method.
增加新的资源加载方法:加载资源对象所属资源包里的所有资源。
This commit is contained in:
@@ -39,10 +39,8 @@ namespace YooAsset
|
||||
InvokeCompletion();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = EStatus.Loading;
|
||||
}
|
||||
|
||||
Status = EStatus.Loading;
|
||||
|
||||
// 注意:模拟异步加载效果提前返回
|
||||
if (IsWaitForAsyncComplete == false)
|
||||
@@ -62,7 +60,7 @@ namespace YooAsset
|
||||
List<UnityEngine.Object> result = new List<Object>(findAssets.Length);
|
||||
foreach (var findAsset in findAssets)
|
||||
{
|
||||
if (findAsset.GetType() == AssetType)
|
||||
if (AssetType.IsAssignableFrom(findAsset.GetType()))
|
||||
result.Add(findAsset);
|
||||
}
|
||||
AllAssetObjects = result.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user