mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-22 08:20:18 +00:00
update package system
This commit is contained in:
@@ -571,6 +571,18 @@ namespace YooAsset
|
|||||||
return LoadAssetInternal(assetInfo, true);
|
return LoadAssetInternal(assetInfo, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 同步加载资源对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">资源的定位地址</param>
|
||||||
|
public AssetOperationHandle LoadAssetSync(string location)
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
Type type = typeof(UnityEngine.Object);
|
||||||
|
AssetInfo assetInfo = ConvertLocationToAssetInfo(location, type);
|
||||||
|
return LoadAssetInternal(assetInfo, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步加载资源对象
|
/// 异步加载资源对象
|
||||||
@@ -606,6 +618,18 @@ namespace YooAsset
|
|||||||
return LoadAssetInternal(assetInfo, false);
|
return LoadAssetInternal(assetInfo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异步加载资源对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">资源的定位地址</param>
|
||||||
|
public AssetOperationHandle LoadAssetAsync(string location)
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
Type type = typeof(UnityEngine.Object);
|
||||||
|
AssetInfo assetInfo = ConvertLocationToAssetInfo(location, type);
|
||||||
|
return LoadAssetInternal(assetInfo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private AssetOperationHandle LoadAssetInternal(AssetInfo assetInfo, bool waitForAsyncComplete)
|
private AssetOperationHandle LoadAssetInternal(AssetInfo assetInfo, bool waitForAsyncComplete)
|
||||||
{
|
{
|
||||||
@@ -660,6 +684,18 @@ namespace YooAsset
|
|||||||
return LoadSubAssetsInternal(assetInfo, true);
|
return LoadSubAssetsInternal(assetInfo, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 同步加载子资源对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">资源的定位地址</param>
|
||||||
|
public SubAssetsOperationHandle LoadSubAssetsSync(string location)
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
Type type = typeof(UnityEngine.Object);
|
||||||
|
AssetInfo assetInfo = ConvertLocationToAssetInfo(location, type);
|
||||||
|
return LoadSubAssetsInternal(assetInfo, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步加载子资源对象
|
/// 异步加载子资源对象
|
||||||
@@ -695,6 +731,18 @@ namespace YooAsset
|
|||||||
return LoadSubAssetsInternal(assetInfo, false);
|
return LoadSubAssetsInternal(assetInfo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异步加载子资源对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">资源的定位地址</param>
|
||||||
|
public SubAssetsOperationHandle LoadSubAssetsAsync(string location)
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
Type type = typeof(UnityEngine.Object);
|
||||||
|
AssetInfo assetInfo = ConvertLocationToAssetInfo(location, type);
|
||||||
|
return LoadSubAssetsInternal(assetInfo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private SubAssetsOperationHandle LoadSubAssetsInternal(AssetInfo assetInfo, bool waitForAsyncComplete)
|
private SubAssetsOperationHandle LoadSubAssetsInternal(AssetInfo assetInfo, bool waitForAsyncComplete)
|
||||||
{
|
{
|
||||||
@@ -749,6 +797,18 @@ namespace YooAsset
|
|||||||
return LoadAllAssetsInternal(assetInfo, true);
|
return LoadAllAssetsInternal(assetInfo, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 同步加载资源包内所有资源对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">资源的定位地址</param>
|
||||||
|
public AllAssetsOperationHandle LoadAllAssetsSync(string location)
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
Type type = typeof(UnityEngine.Object);
|
||||||
|
AssetInfo assetInfo = ConvertLocationToAssetInfo(location, type);
|
||||||
|
return LoadAllAssetsInternal(assetInfo, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步加载资源包内所有资源对象
|
/// 异步加载资源包内所有资源对象
|
||||||
@@ -784,6 +844,18 @@ namespace YooAsset
|
|||||||
return LoadAllAssetsInternal(assetInfo, false);
|
return LoadAllAssetsInternal(assetInfo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异步加载资源包内所有资源对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">资源的定位地址</param>
|
||||||
|
public AllAssetsOperationHandle LoadAllAssetsAsync(string location)
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
Type type = typeof(UnityEngine.Object);
|
||||||
|
AssetInfo assetInfo = ConvertLocationToAssetInfo(location, type);
|
||||||
|
return LoadAllAssetsInternal(assetInfo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private AllAssetsOperationHandle LoadAllAssetsInternal(AssetInfo assetInfo, bool waitForAsyncComplete)
|
private AllAssetsOperationHandle LoadAllAssetsInternal(AssetInfo assetInfo, bool waitForAsyncComplete)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user