Search Unity

Question UnityWebRequest doesn't work in Oculus Go

Discussion in 'VR' started by BMO_blanc, Oct 3, 2020.

  1. BMO_blanc

    BMO_blanc

    Joined:
    Apr 4, 2020
    Posts:
    2
    Hello, I have a question about UnityWebRequest when using in Oculus Go. UnityWebRequest work well in UnityEditor. However, UnityWebRequest doesn't work in Oculus Go... It seems just no connect to http url because there is no log in putty.

    Code (CSharp):
    1. WWWForm form = new WWWForm();
    2.         form.AddField("galleryidx", 1);
    3.         Debug.Log("get art");
    4.         string Url = "http://[awsIPaddress]/vr/enterGallery";
    5.  
    6.         UnityWebRequest request = UnityWebRequest.Post(Url, form);
    7.         request.chunkedTransfer = false;
    8.         yield return request.SendWebRequest();
    9.  
    10.         if (request.isNetworkError)
    11.         {
    12.             //show message "no internet "
    13.             Debug.Log("no internet");
    14.         }
    15.         else
    16.         {
    17.             if (request.isDone)
    18.             {
    19.                 Debug.Log("getting image");
    20.                 Debug.Log(request.downloadHandler.text);
    21.                 //using JsonHelper to get json data
    22.                 allPosts = JsonHelper.getJsonArray<Post>(request.downloadHandler.text);
    23.                 StartCoroutine(GetArtsImages());
    24.             }
    25.         }
    Our team really wants to fix this problem, but there is no error message so we doesn't know what causes this problem. Is there any ideas to How can I fix it? We are using unity 2018.4.15f1.

    We also read similar post(https://forum.unity.com/threads/unitywebrequest-not-working-for-oculus-quest.830199/ ) and modified AndroidManifest...but still same as well.

    Thanks.
     
  2. BMO_blanc

    BMO_blanc

    Joined:
    Apr 4, 2020
    Posts:
    2
    we just solved. unity project android manifest file didn't include <uses-permission android:name="android.permission.INTERNET" />. We also change build system as Internal in build setting.
     
    JoeStrout likes this.
  3. stathism

    stathism

    Joined:
    Dec 15, 2017
    Posts:
    2
    Hi, i have the same problem. Where did you locate the manifest file?