private IEnumerator LoadAssetBundleQueue() { yield return(null); OnStartedDownloading(); int compelete = 0; while (downloadingTask.Count != 0) { AsyncTask result = downloadingTask [0].Key.Request(this); OnProgressDownloading(result, compelete, compelete + downloadingTask.Count); while (!result.IsDone) { if (downloadingTask [0].Value.IsAbort) { result.Abort(); } else { downloadingTask [0].Value.SetProgress(result.Progress); } yield return(null); } downloadingTask [0].Value.Done(); downloadingTask.RemoveAt(0); compelete++; } OnEndedDownloading(); }
public void Abort() { asyncResult.Abort(); }