WWW加载取得下载进度
using System.Collections;
using UnityEngine;

public class Proc : MonoBehaviour {

    WWW www;
    
    void Start () {
        StartCoroutine(Down());
	}
	
	void Update () {
        if(www != null)
        Debug.Log(www.progress);
	}

    IEnumerator Down()
    {
        www = new WWW("https://store.unity.com/cn/download/thank-you?thank-you=personal&os=win&nid=528");
        yield return www;
    }
    
}

当然,下载进度其实是对大型文件才有用处的,不然只能看到0直接变成1了。


首页 我的博客
粤ICP备17103704号