Can’t seem to get a response from WWW class with WebGL running in a browser.
The code is as simple as possible:
void Start () {
StartCoroutine ("testURL");
}
public IEnumerator testURL()
{
Debug.Log("testURL started");
WWW www = new WWW (baseURL);
yield return www;
if (www.error == null)
{
Debug.Log("success");
}
else
{
Debug.LogError(www.error);
}
}
I have another component displaying everything that gets logged. The last entry is “testURL started”, so that method never executes past the yield return; The server that baseURL refers to, logs the request as successful (status 200).
The same code works in WebPlayer and when targetting WebGL, but running in Editor. I have Enable Exceptions set to Full in PlayerSettings.
What else can I try?