Update document

pull/4/head
hevinci 2022-03-04 18:46:24 +08:00
parent 426ad262b1
commit 9fd1200d6e
2 changed files with 15 additions and 24 deletions

View File

@ -1,3 +1,14 @@
# 资源部署
监听
在资源补丁包构建成功之后需要将补丁包传输到CDN服务器上。
如果是本地测试可以在本地创建一个WEB服务器然后将补丁包拷贝到WEB服务器下。
````
CDN
└─android
├─100 补丁包文件夹
├─101 补丁包文件夹
└─102 补丁包文件夹
````

View File

@ -61,10 +61,12 @@ private void CreateDownloader()
/// </summary>
private IEnumerator Download()
{
//注册下载回调
//注册回调方法
_downloader.OnDownloadFileFailedCallback = OneDownloadFileFailed;
_downloader.OnDownloadProgressCallback = OnDownloadProgressUpdate;
_downloader.OnDownloadOverCallback = OnDownloadOver;
//开启下载
_downloader.BeginDownload();
yield return _downloader;
@ -78,27 +80,5 @@ private IEnumerator Download()
//下载失败
}
}
/// <summary>
/// 文件下载失败
/// </summary>
private void OneDownloadFileFailed(string fileName)
{
Debug.LogError($"File download failed : {fileName}");
}
/// <summary>
/// 下载进度的更新
/// </summary>
private void OnDownloadProgressUpdate(int totalDownloadCount, int currentDownloadCount, long totalDownloadSizeBytes, long currentDownloadSizeBytes)
{
}
/// <summary>
/// 下载结束,成功或失败
/// </summary>
private void OnDownloadOver(bool isSucceed)
{
}
````