It just gives me an unknown error. Here's the code:
UnityWebRequest www = UnityWebRequest.Get("http://cool-levels.x10.mx/Levels/" + id + ".txt");
yield return www.SendWebRequest();
returnValue = "Not found";
if (www.result != UnityWebRequest.Result.Success)
{
Debug.LogError(www.error);
}
else
{
returnValue = www.downloadHandler.text;
}
It works fine in the editor.
↧