public new void GetText(string uri, Action <float> progress, DelGetTextCallback callback, int timeout = 0) { if (!downReqMap.ContainsKey(uri)) { coroutines.Add(uri, StartCoroutine(base.GetText(uri, progress, callback, timeout))); } }
protected IEnumerator GetText(string uri, Action <float> progress, DelGetTextCallback callback, int timeout) { UnityWebRequest uwr = UnityWebRequest.Get(uri); uwr.timeout = timeout; uwr.SendWebRequest(); downReqMap.Add(uri, uwr); yield return(getProgress(uwr, progress)); string text = (string.IsNullOrEmpty(uwr.error)) ? uwr.downloadHandler.text : string.Empty; if (callback != null) { callback(uwr.error, text); } Dispose(uri); }