Ejemplo n.º 1
0
    IEnumerator DownloadProgress(string url, DownloadCallbackDelegate callback)
    {
        www = new WWW(url);
        if (!www.isDone)
        {
            yield return(www);
        }

        callback(www);
        if (sendGuilayerProgress)
        {
            GameGUI.Inst.guiLayer.SendGuiLayerProgress(name, www.progress);
        }

        www = null;
        Destroy(this);
    }
Ejemplo n.º 2
0
 public void StartDownload(string url, DownloadCallbackDelegate callback, bool sendGuilayerProgress_ = false)
 {
     sendGuilayerProgress = sendGuilayerProgress_;
     StartCoroutine(DownloadProgress(url, callback));
 }