Update YooAssets.cs

pull/4/head
hevinci 2022-04-04 22:43:47 +08:00
parent abdf2b859e
commit 991fa5b250
1 changed files with 12 additions and 0 deletions

View File

@ -96,6 +96,11 @@ namespace YooAsset
/// 备用的资源服务器下载地址
/// </summary>
public string FallbackHostServer;
/// <summary>
/// 启用断点续传功能的文件大小
/// </summary>
public int BreakpointResumeFileSize = int.MaxValue;
}
@ -168,6 +173,13 @@ namespace YooAsset
// 初始化异步操作系统
OperationSystem.Initialize(parameters.OperationSystemMaxTimeSlice);
// 初始化下载系统
if (_playMode == EPlayMode.HostPlayMode)
{
var hostPlayModeParameters = parameters as HostPlayModeParameters;
DownloadSystem.Initialize(hostPlayModeParameters.BreakpointResumeFileSize);
}
// 初始化资源系统
if (_playMode == EPlayMode.EditorPlayMode)
{