// download version public void RequestVersion(HandleDownloadFinish handler) { StartCoroutine(Download(delegate(WWW www){ handler(www); } )); }
IEnumerator _DownloadAssetBundle(string url, string assetBundleName, HandleDownloadFinish handler) { Debug.Log("start downloading " + url); WWW www = new WWW(url); s_DownloadingWWWs.Add(assetBundleName, www); yield return(www); if (www.error != null) { Debug.LogError("downloading error! " + www.error); } else { if (www.isDone) { if (handler != null) { handler(www); } } } // destroy s_DownloadingWWWs.Remove(assetBundleName); www.Dispose(); }
IEnumerator Download(HandleDownloadFinish handler) { string url = AssetBundleManager.Instance.BaseDownloaindURL + "resourcelist.txt"; WWW www = new WWW(url); yield return(www); handler(www); www.Dispose(); }