private IEnumerator DownloadFile(string Path, DownloadCallBack cb) { Debug.Log("==DownloadFile===" + Path); WWW www = new WWW(Path); while (!www.isDone) { yield return(new WaitForEndOfFrame()); } Debug.Log("==DownloadFile size3==" + www.bytesDownloaded + " : " + www.bytes.ToString()); if (cb != null) { cb.Invoke(www); } }
public Queue(DownloadCallBack callback) { download_callback = callback; }
public IEnumerator DownloadReources(string path, DownloadCallBack cb) { string url = AppConst.WebUrl + "testHttpServer/" + path; return(DownloadFile(url, cb)); }
public IEnumerator CheckVersion(DownloadCallBack cb) { string url = AppConst.WebUrl + "testHttpServer"; return(DownloadFile(url, cb)); }