From 991fa5b25014017843526a71752c3e599fdd8e49 Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 4 Apr 2022 22:43:47 +0800 Subject: [PATCH] Update YooAssets.cs --- Assets/YooAsset/Runtime/YooAssets.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Assets/YooAsset/Runtime/YooAssets.cs b/Assets/YooAsset/Runtime/YooAssets.cs index bb99eb3..ef84d9e 100644 --- a/Assets/YooAsset/Runtime/YooAssets.cs +++ b/Assets/YooAsset/Runtime/YooAssets.cs @@ -96,6 +96,11 @@ namespace YooAsset /// 备用的资源服务器下载地址 /// public string FallbackHostServer; + + /// + /// 启用断点续传功能的文件大小 + /// + 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) {