diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs
index 6615234..4e57fed 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs
@@ -28,6 +28,7 @@ namespace YooAsset
// 数据相关
private ESteps _steps = ESteps.None;
+ private bool _isPause = false;
private long _lastDownloadBytes = 0;
private int _lastDownloadCount = 0;
@@ -153,6 +154,9 @@ namespace YooAsset
// 注意:如果期间有下载失败的文件,暂停动态创建下载器
if (_downloadList.Count > 0 && _loadFailedList.Count == 0)
{
+ if (_isPause)
+ return;
+
if (_downloaders.Count < _downloadingMaxNumber)
{
int index = _downloadList.Count - 1;
@@ -195,6 +199,22 @@ namespace YooAsset
OperationSystem.StartOperaiton(this);
}
}
+
+ ///
+ /// 暂停下载
+ ///
+ public void PauseDownload()
+ {
+ _isPause = true;
+ }
+
+ ///
+ /// 恢复下载
+ ///
+ public void ResumeDownload()
+ {
+ _isPause = false;
+ }
}
public sealed class PackageDownloaderOperation : DownloaderOperation
diff --git a/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs b/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs
index fce87cf..d5b10aa 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs
@@ -23,7 +23,7 @@ namespace YooAsset
public int ResourceVersion;
///
- /// 内置资源的标记列表
+ /// 内置资源的标签列表(首包资源)
///
public string BuildinTags;