Пример #1
0
    private IEnumerator Request(Delegates.AssetServiceCallback requestCallback)
    {
        pending = true;

        NetworkEvent.NetworkRequestStart(this);

        webRequest = new UnityWebRequest(url, UnityWebRequest.kHttpVerbGET);
        webRequest.downloadHandler = new DownloadHandlerBuffer();
#if UNITY_2017_3_OR_NEWER
        yield return(webRequest.SendWebRequest());
#else
        yield return(webRequest.Send());
#endif

        pending = false;

        OnRequestCompleted(requestCallback);
    }