public void DownloadData(string url, string savePath, Action <object> callback) { try { _webclient = new WebClientEx(30 * 60, 30); _webclient.DownloadProgressChanged += DownloadProgressChanged; _webclient.DownloadFileCompleted += DownloadFileCompleted; _webclient.DownloadDataCompleted += DownloadDataCompleted; //if (_webclient.IsBusy) // _webclient.CancelAsync(); finish = false; error = null; process = 0f; _parms[0] = savePath; _parms[1] = callback; Thread.Sleep(0); _checkDonloading = TimerManager.Instance.AddDelayTimer(30, DownloadTimeOut); _webclient.DownloadDataAsync(new Uri(url), _parms); } catch (System.Exception ex) { Debugger.LogError(ex); } }