IEnumerator request() { //Debug.Log("Start http:" + url); //yield return null; using (www = new MyWWW(url, timeOut)) { //HgqTest.AddUrlDown(url); yield return(www); //HgqTest.EndUrlDown(url); Debug.Log("http:" + url); if (www.error != null) { success = false; error = www.error; yield break; } ab = www.assetBundle; text = www.text; texture = www.texture; bytes = www.bytes; } }
public static void Request(string url, float timeout, UnityAction <WWW> cmpCallback, UnityAction timeOutCallback, UnityAction failCallback, UnityAction <float> onProgress, string postfix = "") { MyWWW mw = new MyWWW(url, timeout, cmpCallback, timeOutCallback, failCallback, onProgress, postfix); CoroutineManager.Singleton.startCoroutine(mw.DownLoadCoroutine()); }