mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-25 02:00:16 +00:00
Add load all asset method.
增加新的资源加载方法:加载资源对象所属资源包里的所有资源。
This commit is contained in:
@@ -140,6 +140,8 @@ namespace YooAsset
|
||||
handle = new SceneOperationHandle(this);
|
||||
else if (IsSubAssetsProvider())
|
||||
handle = new SubAssetsOperationHandle(this);
|
||||
else if (IsAllAssetsProvider())
|
||||
handle = new AllAssetsOperationHandle(this);
|
||||
else
|
||||
handle = new AssetOperationHandle(this);
|
||||
|
||||
@@ -162,28 +164,6 @@ namespace YooAsset
|
||||
RefCount--;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否为场景提供者
|
||||
/// </summary>
|
||||
public bool IsSceneProvider()
|
||||
{
|
||||
if (this is BundledSceneProvider || this is DatabaseSceneProvider)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否为子资源对象提供者
|
||||
/// </summary>
|
||||
public bool IsSubAssetsProvider()
|
||||
{
|
||||
if (this is BundledSubAssetsProvider || this is DatabaseSubAssetsProvider)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 等待异步执行完毕
|
||||
/// </summary>
|
||||
@@ -218,6 +198,28 @@ namespace YooAsset
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSceneProvider()
|
||||
{
|
||||
if (this is BundledSceneProvider || this is DatabaseSceneProvider)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public bool IsSubAssetsProvider()
|
||||
{
|
||||
if (this is BundledSubAssetsProvider || this is DatabaseSubAssetsProvider)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public bool IsAllAssetsProvider()
|
||||
{
|
||||
if (this is BundledAllAssetsProvider || this is DatabaseAllAssetsProvider)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
#region 异步编程相关
|
||||
private TaskCompletionSource<object> _taskCompletionSource;
|
||||
protected void InvokeCompletion()
|
||||
|
||||
Reference in New Issue
Block a user