Hi! I need help regarding an error I am getting on Unity6 IN the editor.
The code worked last time I used it, but it was not on Unity6. After the change, it seems that the URL is not reachable anymore. I tested it with other URLs on testrequests, but the same error occured.
Is there a setting anywhere which I have to configure in Unity6?
Here is the test request:
IEnumerator TestGetRequest()
{
string testUrl = “https://jsonplaceholder.typicode.com/todos/1”;
UnityWebRequest testRequest = UnityWebRequest.Get(testUrl);
yield return testRequest.SendWebRequest();
if (testRequest.result == UnityWebRequest.Result.ConnectionError ||
testRequest.result == UnityWebRequest.Result.ProtocolError)
{
Debug.LogError("Error: " + testRequest.error);
}
else
{
Debug.Log(“Test Request Success”);
Debug.Log("Response: " + testRequest.downloadHandler.text);
}
}
I get the error:
“Cannot resolve destination host”
I would appreciate any help!