mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
This commit is contained in:
@@ -100,7 +100,7 @@ namespace YooAsset
|
||||
var playModeImpl = new PlayModeImpl(PackageName, _playMode);
|
||||
_bundleQuery = playModeImpl;
|
||||
_playModeImpl = playModeImpl;
|
||||
_resourceManager.Initialize(_bundleQuery);
|
||||
_resourceManager.Initialize(parameters, _bundleQuery);
|
||||
|
||||
// 初始化资源系统
|
||||
InitializationOperation initializeOperation;
|
||||
@@ -162,6 +162,10 @@ namespace YooAsset
|
||||
throw new Exception($"Editor simulate mode only support unity editor.");
|
||||
#endif
|
||||
|
||||
// 检测初始化参数
|
||||
if (parameters.BundleLoadingMaxConcurrency <= 0)
|
||||
throw new Exception($"{nameof(parameters.BundleLoadingMaxConcurrency)} value must be greater than zero.");
|
||||
|
||||
// 鉴定运行模式
|
||||
if (parameters is EditorSimulateModeParameters)
|
||||
_playMode = EPlayMode.EditorSimulateMode;
|
||||
@@ -263,8 +267,11 @@ namespace YooAsset
|
||||
/// <param name="clearParam">执行参数</param>
|
||||
public ClearCacheFilesOperation ClearCacheFilesAsync(EFileClearMode clearMode, object clearParam = null)
|
||||
{
|
||||
DebugCheckInitialize();
|
||||
var operation = _playModeImpl.ClearCacheFilesAsync(clearMode.ToString(), clearParam);
|
||||
DebugCheckInitialize(false);
|
||||
ClearCacheFilesOptions options = new ClearCacheFilesOptions();
|
||||
options.ClearMode = clearMode.ToString();
|
||||
options.ClearParam = clearParam;
|
||||
var operation = _playModeImpl.ClearCacheFilesAsync(options);
|
||||
OperationSystem.StartOperation(PackageName, operation);
|
||||
return operation;
|
||||
}
|
||||
@@ -276,8 +283,11 @@ namespace YooAsset
|
||||
/// <param name="clearParam">执行参数</param>
|
||||
public ClearCacheFilesOperation ClearCacheFilesAsync(string clearMode, object clearParam = null)
|
||||
{
|
||||
DebugCheckInitialize();
|
||||
var operation = _playModeImpl.ClearCacheFilesAsync(clearMode, clearParam);
|
||||
DebugCheckInitialize(false);
|
||||
ClearCacheFilesOptions options = new ClearCacheFilesOptions();
|
||||
options.ClearMode = clearMode;
|
||||
options.ClearParam = clearParam;
|
||||
var operation = _playModeImpl.ClearCacheFilesAsync(options);
|
||||
OperationSystem.StartOperation(PackageName, operation);
|
||||
return operation;
|
||||
}
|
||||
@@ -610,6 +620,7 @@ namespace YooAsset
|
||||
private SceneHandle LoadSceneInternal(AssetInfo assetInfo, bool waitForAsyncComplete, LoadSceneMode sceneMode, LocalPhysicsMode physicsMode, bool suspendLoad, uint priority)
|
||||
{
|
||||
DebugCheckAssetLoadType(assetInfo.AssetType);
|
||||
assetInfo.LoadMethod = AssetInfo.ELoadMethod.LoadScene;
|
||||
var loadSceneParams = new LoadSceneParameters(sceneMode, physicsMode);
|
||||
var handle = _resourceManager.LoadSceneAsync(assetInfo, loadSceneParams, suspendLoad, priority);
|
||||
if (waitForAsyncComplete)
|
||||
@@ -720,6 +731,7 @@ namespace YooAsset
|
||||
private AssetHandle LoadAssetInternal(AssetInfo assetInfo, bool waitForAsyncComplete, uint priority)
|
||||
{
|
||||
DebugCheckAssetLoadType(assetInfo.AssetType);
|
||||
assetInfo.LoadMethod = AssetInfo.ELoadMethod.LoadAsset;
|
||||
var handle = _resourceManager.LoadAssetAsync(assetInfo, priority);
|
||||
if (waitForAsyncComplete)
|
||||
handle.WaitForAsyncComplete();
|
||||
@@ -829,6 +841,7 @@ namespace YooAsset
|
||||
private SubAssetsHandle LoadSubAssetsInternal(AssetInfo assetInfo, bool waitForAsyncComplete, uint priority)
|
||||
{
|
||||
DebugCheckAssetLoadType(assetInfo.AssetType);
|
||||
assetInfo.LoadMethod = AssetInfo.ELoadMethod.LoadSubAssets;
|
||||
var handle = _resourceManager.LoadSubAssetsAsync(assetInfo, priority);
|
||||
if (waitForAsyncComplete)
|
||||
handle.WaitForAsyncComplete();
|
||||
@@ -938,6 +951,7 @@ namespace YooAsset
|
||||
private AllAssetsHandle LoadAllAssetsInternal(AssetInfo assetInfo, bool waitForAsyncComplete, uint priority)
|
||||
{
|
||||
DebugCheckAssetLoadType(assetInfo.AssetType);
|
||||
assetInfo.LoadMethod = AssetInfo.ELoadMethod.LoadAllAssets;
|
||||
var handle = _resourceManager.LoadAllAssetsAsync(assetInfo, priority);
|
||||
if (waitForAsyncComplete)
|
||||
handle.WaitForAsyncComplete();
|
||||
|
Reference in New Issue
Block a user