unity WWW加载进度条
2024-09-27 16:13:09
using UnityEngine;
using System.Collections; public class testProgress : MonoBehaviour { void Start () {
StartCoroutine (getWWW());
} IEnumerator getWWW(){
WWW www = new WWW ("http://192.168.1.106/app/s01.mp3");
string progress;
while(!www.isDone){
progress=(((int)(www.progress * )) % ) + "%";
Debug.Log (progress);
yield return ;
}
if(www.error!=null){
Debug.Log ("loading error:"+www.url);
}else{
progress="100%";
Debug.Log (progress);
//enter complete code
}
} }
最新文章
- 关于vue.js中列表渲染练习
- PCI在linux系统中注册与注销示例
- 《UIP在NIOS上的移植》
- 关于ubuntu下词典安装
- Delphi的DateToStr StrToDate格式灵活用法
- JZ2440开发笔记(2)——minicom的安装和配置使用【转】
- expressJS - 准备活动
- 我的前端故事----关于前端数据&;逻辑的思考
- C# 复选框显示多项选择
- 使用datagrid时json的格式
- 【golang-GUI开发】qt之signal和slot(一)
- 关于vue2.0 cnpm 镜像安装
- Python_logging模块
- 【JVM】-NO.111.JVM.1 -【JDK11 HashMap详解-1-hash()剖析】
- Windows核心编程:第12章 纤程
- 鸟哥的Linux私房菜——第十五章:正规表示法
- 如何判断 ios设备的类型(iphone,ipod,ipad)
- Salience Model
- Python练习-sys.argv的无聊用法
- 用 S5PV210 学习 Linux (二) 刷机(二)
热门文章
- jQuery与DOM对象的转换
- Git密钥生成步骤SSH Key
- centOS 6.5关闭防火墙步骤
- MFC的组合框(ComboBox)控件切换下拉样式
- php对象的实现
- git: fatal: Could not read from remote repository
- 如何制作Jar包并在android中调用jar包
- js引用类型之valueof和tostring(三)
- appium+python自动化38-adb shell按键操作(input keyevent)
- PHP中的urlencode,rawurlencode和JS中的encodeURI,encodeURIComponent