I am trying to make a unityWebRequest to an API and everything runs smoothly on a normal unity app, but when I transfer the application to my oculus quest as soon as the method "checkCode()" is called triggering the GetAuthRequest() method that does the unityWebRequest the oculus application crashes.
I've tried rewriting the code in a couple of different ways and nothing seems to be fixing the issue. My Quest has internet access and I believe I have Android SDK installed.
public void CheckCode()
{
StartCoroutine(GetAuthRequest("http://myURL/", attemptedCode));
}
IEnumerator GetAuthRequest(string uri, string attemptedCode)
{
setValue("IN_REQ");
using (UnityWebRequest webRequest = UnityWebRequest.Get(uri + attemptedCode))
{
//// Request and wait for the desired page.
yield return webRequest.SendWebRequest();
if (webRequest.isNetworkError)
{
setValue("NET_ERROR");
}
else
{
if (webRequest.downloadHandler.text.Equals("true"))
{
ClearCode();
setValue("Authenticated!");
}
else
{
ClearCode();
setValue("Error...");
}
}
}
}