Home > other >  Unity3D dishes about HTTP requests met pit, pursuing big feet guessing
Unity3D dishes about HTTP requests met pit, pursuing big feet guessing

Time:09-18

With unity coroutines requests HTTP data, encounter a problem, I make multiple requests at the same time, also is at the same time, many times call StartCoroutine (the SendRequest ()),
But in fact can obtain the response data, the less likely than I request to have excuse me Daniel encountered such a problem, what is my improper use or stepped on pit,

Public IEnumerator the SendRequest ()
{
UnityWebRequest request=new UnityWebRequest (URL, "POST");
Request. UploadHandler=new UploadHandlerRaw (netPostData_);
Request. DownloadHandler=new DownloadHandlerBuffer ();
Yield return request. SendWebRequest ();

The Debug Log (" Response ");
}

Also is what I call the five StartCoroutine (the SendRequest ()), but in fact in the SendRequest function played the Debug Log. The Log (" Response ") will be less than 5 times, is this why?

CodePudding user response:

This part of the normal unity a request frequency gao will go wrong
  • Related