Search Unity

Question Making a OCULUS Vr game

Discussion in 'VR' started by qiveal, Jun 17, 2022.

  1. qiveal

    qiveal

    Joined:
    Jan 31, 2022
    Posts:
    320
    I'm making my very first game for Oculus in Unity. I'm able to get an apk file on my headset, however it just does the gray screen with the three dots loading and then crashes. Now I was looking at my build settings and there is no longer an option for Virtual Reality Supported, it used to be there a few days ago with the same version of Unity how do I fix this?
     
  2. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Which Oculus? Quest? And what do you mean by no option for Virtual Reality in build settings? This is my build settings for Oculus Quest - there is no VR setting, just Android: upload_2022-6-17_18-46-5.png

    Also if you want to see what the error is, assuming you have the Oculus Integration asset installed, look under Oculus > OVR Build > Build and run ... which will open ADB logging and you can see exactly the error message. Alternatively you can run from the command-line adb or you can install Oculus Developer Hub and there is an option under Device Manager to debug your application. Pay attention the log file, it will tell you the exceptions, errors and fatal errors, one or more of these errors will tell you why it's crashing.

    You might want to consider following one of the many tutorials available online for building for Oculus Quest.
     
  3. qiveal

    qiveal

    Joined:
    Jan 31, 2022
    Posts:
    320
    Oculus Quest 2, Sorry, I meant in the player options for android there should be a Virtual Reality Supported option, there was a few days ago in the same version of Unity but none now, why?
     
  4. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Which version of Unity?

    Did you look at that tutorial I linked? The VR options in Player are no longer in Unity - it's been moved to a separate XR Plug-in Management section unless you are using older Unity versions (2018 or 19? I forget exactly). You also need to install Oculus Integration. Best case read the tutorial or search for a "recent" (last 2 years) Oculus Quest tutorial - there are many.
     
    Last edited: Jun 17, 2022
  5. qiveal

    qiveal

    Joined:
    Jan 31, 2022
    Posts:
    320
    I didn't look at your exact tutorial instead I watched a video tutorial. It's still doing the same thing. Now I notice in the tutorial (the article you sent me) they chose Oculus for the Plug-in management, in my project I chose OpenXR do I need to switch to Oculus for it to work? I chose OpenXR before cause I thought they were going to be switching to that.
     
  6. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Then check adb logs via one of the 3 options I listed above to see what the error is.
     
  7. qiveal

    qiveal

    Joined:
    Jan 31, 2022
    Posts:
    320
    I got it to work, thanks.
     
  8. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    What was the problem and solution? Maybe you can help other people who have the same problem in the future.
     
  9. qiveal

    qiveal

    Joined:
    Jan 31, 2022
    Posts:
    320
    Turned plug-in management to oculus, and turned off auto graphic api and made sure OpenGLES3 was the only one.
     
    glenneroo likes this.