当前位置:网站首页>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);
}
边栏推荐
- Jump to the mobile terminal page or PC terminal page according to the device information
- 2022年上半年5月网络工程师试题及答案
- 2021 summary and 2022 outlook
- leetcode-560:和为 K 的子数组
- ThreadLocal is not enough
- String formatting
- 软考中级,软件设计师考试那些内容,考试大纲什么的?
- 原型与原型链
- 施努卡:机器视觉定位技术 机器视觉定位原理
- Some online academic report websites and machine learning videos
猜你喜欢

【机器学习 03】拉格朗日乘子法

打算参加安全方面工作,信息安全工程师怎么样,软考考试需要怎么准备?

软考一般什么时候出成绩呢?在线蹬?

2022年上半年5月网络工程师试题及答案

Socket communication principle and Practice
![[daiy5] jz77 print binary tree in zigzag order](/img/ba/b2dfbf121798757c7b9fba4811221b.png)
[daiy5] jz77 print binary tree in zigzag order

使用Tansformer分割三维腹部多器官--UNETR实战

【推荐系统 01】Rechub

Monai version has been updated to 0.9. See what new functions it has

leetcode-304:二维区域和检索 - 矩阵不可变
随机推荐
P1223 queuing for water /1319: [example 6.1] queuing for water
Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
What are the test preparation materials and methods for soft exam information processing technicians?
555 circuit details
How much review time does it usually take to take the intermediate soft exam?
想考中级软考,一般需要多少复习时间?
Schnuka: working principle of robot visual grasping machine visual grasping
MONAI版本更新到 0.9 啦,看看有什么新功能
BUUCTF---Reverse---reverse1
SQL Server 知识汇集11 : 约束
A simple example of delegate usage
What are the contents of the intermediate soft test, the software designer test, and the test outline?
Deep understanding of Apache Hudi asynchronous indexing mechanism
[machine learning 03] Lagrange multiplier method
What is an intermediate network engineer? What is the main test and what is the use?
【亲测可行】error while loading shared libraries的解决方案
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
无法打开内核设备“\\.\VMCIDev\VMX”: 操作成功完成。是否在安装 VMware Workstation 后重新引导? 模块“DevicePowerOn”启动失败。 未能启动虚拟机。
The gun startles the dragon, and the crowd "locks" Zhou Zhi
南航 PA3.1