mirror of https://github.com/tuyoogame/YooAsset
Update document
parent
426ad262b1
commit
9fd1200d6e
|
@ -1,3 +1,14 @@
|
|||
# 资源部署
|
||||
|
||||
监听
|
||||
在资源补丁包构建成功之后,需要将补丁包传输到CDN服务器上。
|
||||
|
||||
如果是本地测试,可以在本地创建一个WEB服务器,然后将补丁包拷贝到WEB服务器下。
|
||||
|
||||
````
|
||||
CDN
|
||||
└─android
|
||||
├─100 补丁包文件夹
|
||||
├─101 补丁包文件夹
|
||||
└─102 补丁包文件夹
|
||||
````
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
````
|
||||
|
||||
|
|
Loading…
Reference in New Issue