【m】yooasset更新
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 3s
Plugin Library CI / publish (07.RKTools) (push) Successful in 2s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 1m25s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 4s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 4s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 3s
Plugin Library CI / publish (07.RKTools) (push) Successful in 2s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 1m25s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 4s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 4s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
This commit is contained in:
@@ -173,6 +173,13 @@ namespace YooAsset
|
||||
|
||||
if (Result != null)
|
||||
Result.UnloadBundleFile();
|
||||
|
||||
if (IsDone == false)
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "Bundle loader destroyed !";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -180,11 +187,7 @@ namespace YooAsset
|
||||
/// </summary>
|
||||
public bool CanDestroyLoader()
|
||||
{
|
||||
// 注意:正在加载中的任务不可以销毁
|
||||
if (_steps == ESteps.LoadBundleFile)
|
||||
return false;
|
||||
|
||||
if (RefCount > 0)
|
||||
if (CanReleasableLoader() == false)
|
||||
return false;
|
||||
|
||||
// YOOASSET_LEGACY_DEPENDENCY
|
||||
@@ -194,14 +197,34 @@ namespace YooAsset
|
||||
{
|
||||
foreach (var bundleID in LoadBundleInfo.Bundle.ReferenceBundleIDs)
|
||||
{
|
||||
#if YOOASSET_EXPERIMENTAL
|
||||
if (_resManager.CheckBundleReleasable(bundleID) == false)
|
||||
return false;
|
||||
#else
|
||||
if (_resManager.CheckBundleDestroyed(bundleID) == false)
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否可以释放
|
||||
/// </summary>
|
||||
public bool CanReleasableLoader()
|
||||
{
|
||||
// 注意:正在加载中的任务不可以销毁
|
||||
if (_steps == ESteps.LoadBundleFile)
|
||||
return false;
|
||||
|
||||
if (RefCount > 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加附属的资源提供者
|
||||
/// </summary>
|
||||
@@ -240,5 +263,28 @@ namespace YooAsset
|
||||
_removeList.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 尝试终止加载器
|
||||
/// </summary>
|
||||
public void TryAbortLoader()
|
||||
{
|
||||
if (IsDone == false)
|
||||
{
|
||||
if (_steps == ESteps.CheckConcurrency)
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "Abort bundle loader !";
|
||||
}
|
||||
|
||||
if (_steps == ESteps.LoadBundleFile)
|
||||
{
|
||||
// 注意:终止下载器
|
||||
if (_loadBundleOp != null)
|
||||
_loadBundleOp.AbortDownloadFile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a3adbd84f3eff44abf6608a4218ca86
|
||||
guid: 031287bf937f83e4fa18a0db797abb42
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
Reference in New Issue
Block a user