Exemplo n.º 1
0
 IEnumerator DownloadFiles()
 {
     DownloadInfo[] downloadInfos = LoadDownloadInfos();
     m_DownloadOperation            = DownloadAsyncOperation.Start <UnityWebRequestHandler>(downloadInfos, 4);
     m_DownloadOperation.completed += OnDownloadCompleted;
     yield return(m_DownloadOperation);
 }
Exemplo n.º 2
0
 /*
  * IEnumerator DownloadFiles()
  * {
  *  DownloadInfo[] downloadInfos = LoadDownloadInfos();
  *  var downloadOperation = DownloadAsyncOperation.Start<UnityWebRequestHandler>(downloadInfos, 4);
  *  downloadOperation.completed += OnDownloadCompleted;
  *  yield return downloadOperation;
  * }
  *
  * IEnumerator DownloadFiles()
  * {
  *  DownloadInfo[] downloadInfos = LoadDownloadInfos();
  *  var downloadOperation = DownloadAsyncOperation.Start<UnityWebRequestHandler>(downloadInfos, 4);
  *  downloadOperation.completed += OnDownloadCompleted;
  *  while(!downloadOperation.isDone)
  *  {
  *      Debug.LogFormat("Download Progress:{0:f2} ", downloadOperation.progress);
  *      yield return null;
  *  }
  * }
  */
 void OnDownloadCompleted(DownloadAsyncOperation downloadAsyncOperation)
 {
     m_DownloadOperation = null;
 }