private IEnumerator DownloadAssetBundle(string url, string location, GetWWW getWWW) { //Debug.Log ("url: " + url); //WWW www = new WWW (url); WWW www = WWW.LoadFromCacheOrDownload (url, 1); yield return www; if (www.error != null) { Debug.Log(www.error); } else if (getWWW != null) { getWWW(www, location); } }
public void DownloadMesh(string url, string location, GetWWW getWWW) { StartCoroutine (DownloadAssetBundle (url, location, getWWW)); }