当前位置:网站首页>Unity downloads files through the server address
Unity downloads files through the server address
2022-07-07 10:49:00 【HCC2017】
public IEnumerator DownLoadToLocal(string downloadingUrl)
{
/// Get download information
UnityWebRequest header = UnityWebRequest.Head(downloadingUrl);
yield return header.SendWebRequest();
if (!header.isHttpError && !header.isNetworkError)
{
Debug.Log(ulong.Parse(header.GetResponseHeader("Content-Length")));
}
/
// Send download request
webRequest = UnityWebRequest.Get(downloadingUrl);
// Set timeout , if webRequest.SendWebRequest() Connection timeout will return , And isNetworkError by true
webRequest.timeout = 30;
yield return webRequest.SendWebRequest();
if (webRequest.isNetworkError)
{
Debug.Log("Download Error:" + webRequest.error);
}
边栏推荐
- 无法打开内核设备“\\.\VMCIDev\VMX”: 操作成功完成。是否在安装 VMware Workstation 后重新引导? 模块“DevicePowerOn”启动失败。 未能启动虚拟机。
- Différences entre les contraintes monotones et anti - monotones
- 软考一般什么时候出成绩呢?在线蹬?
- ThreadLocal is not enough
- TypeScript 接口继承
- CAS机制
- 【推薦系統 01】Rechub
- 软考中级有用吗??
- Mendeley--免费的文献管理工具,给论文自动插入参考文献
- 【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
猜你喜欢
Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
openinstall与虎扑达成合作,挖掘体育文化产业数据价值
CAS机制
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
What are the contents of the intermediate soft test, the software designer test, and the test outline?
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
MONAI版本更新到 0.9 啦,看看有什么新功能
使用Tansformer分割三维腹部多器官--UNETR实战
Simple and easy to modify spring frame components
What does intermediate software evaluator test
随机推荐
The mobile terminal automatically adjusts the page content and font size by setting rem
[système recommandé 01] rechub
Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
深入理解Apache Hudi异步索引机制
优雅的 Controller 层代码
香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
Summary of router development knowledge
July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)
Is the soft test intermediate useful??
P2788 math 1 - addition and subtraction
那些易混淆的概念(三):function和class
JS实现链式调用
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer
openinstall与虎扑达成合作,挖掘体育文化产业数据价值
一些线上学术报告网站与机器学习视频
使用 load_decathlon_datalist (MONAI)快速加载JSON数据
深入理解Apache Hudi异步索引机制
小程序跳转H5,配置业务域名经验教程
原型与原型链
Use load_ decathlon_ Datalist (Monai) fast loading JSON data