Quantcast
Channel: Questions in topic: "httpwebrequest"
Viewing all articles
Browse latest Browse all 190

UnityWebRequest error 0 in Editor, but not in WebGL build

$
0
0
I'm trying to send a UnityWebRequest to a server. It works perfectly on the WebGL Player, but not in the Editor private static IEnumerator SendWebRequest(UnityWebRequest webRequest, UnityAction doneAction) { using (webRequest) { yield return webRequest.Send(); if (webRequest.isError) { throw new Exception("Could not connect to backend: " + webRequest.responseCode); } doneAction(); } } In Editor, I simply dont receive anything from the server. The responseCode is 0. CORS has been set up accourdingly to the Unity Manual. I can get a response to other servers, e.g. www.google.com, it's just my server that is not working. Is there something else that needs to be configured in order for it to work?

Viewing all articles
Browse latest Browse all 190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>