Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Black Screen when building for Oculus Quest

Discussion in 'VR' started by dcrouchelli, Apr 3, 2020.

  1. dcrouchelli

    dcrouchelli

    Joined:
    Dec 13, 2018
    Posts:
    4
    Hi guys, hoping you can help me out. I'm trying to build an app for Oculus Quest. I'm able to successfully build the APK and push it to the device. When I start it up, a black rectangle appears in the middle of the Oculus Home environment and doesn't open up into the full app. I can hear the audio though.

    I'm on Unity 2018.4.9f1, unfortunately, I'm not able to use any other version right now. I have the Oculus integration package and I have the Oculus VR SDK enabled in the player settings. I'm targeting Android API level 25 and get no significant build errors. Not sure what's going wrong here.
     
  2. dcrouchelli

    dcrouchelli

    Joined:
    Dec 13, 2018
    Posts:
    4
    Update: If i take the headset off and put it back on, I can see the app. But it still opens in a box and not in VR.
     
  3. dcrouchelli

    dcrouchelli

    Joined:
    Dec 13, 2018
    Posts:
    4
    Update, just tried on the most recent version of Unity 2018 LTS. Same exact problem.
     
  4. nomadic

    nomadic

    Joined:
    Mar 4, 2010
    Posts:
    44
    I just tried updating my Oculus Integration and started having the same issue. After reverting the problem goes away. No clue what in the integration is causing it.
     
  5. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,924
    I noticed a few days ago that Oculus had just done one of their "invisible, background, you get no choice we're forcing this on you" updates of the drivers. Are you on the new driver versoin (15.0 - should be visible in the Oculus desktop app, and on the Quest's settings in-world - although it can be different versions on each) - and did this start at same time as the update completed?

    (I haven't done any builds with the new drivers yet, but it immediately made me suspicious :))
     
  6. MShotts

    MShotts

    Joined:
    Aug 8, 2019
    Posts:
    11
    Hi Nomadic,
    Could you share the process for reverting it back? I just did my very first build and am experiencing a similar issue as dcrouchelli.
     
    opecputih22mq3qu likes this.
  7. nomadic

    nomadic

    Joined:
    Mar 4, 2010
    Posts:
    44
    @MShotts
    Well sadly it seems Oculus has moved all of their Unity integrations to the Asset Store and you can't download older versions from the developer portal like you used to. Luckily for me I had an older version in source control.

    You can try poking around here: https://developer.oculus.com/downloads/package/unity-integration/ but I'm pretty sure all download links point to the same asset store page which only has one release version. It's really frustrating especially if there is in fact a regression in the integration causing this issue.
     
    MShotts likes this.
  8. MShotts

    MShotts

    Joined:
    Aug 8, 2019
    Posts:
    11
    @nomadic

    Your link was spot on! Previous versions are tucked away on the 'Unity Integration Archive'. Right underneath the title is the version number as well as a down arrow. Clicking the down arrow pulls up all the previous versions for selection. I'll try 14.0 and hopefully that resolves the issue.

    Thanks again!
     
  9. MShotts

    MShotts

    Joined:
    Aug 8, 2019
    Posts:
    11
    Unfortunately, going to 14.0 did not resolve the issue for me.

    I attempted to use the 'OVR Build and Run' which resulted in errors indicating my Android SDK was not found. I followed the advice of the 2 threads below and installed Android Studio rather than rely on the Unity versions. I updated the paths under Edit->Preferences->External Tools but then got errors about the Gradle (only with OVR Build and Run). I installed Gradle as well and updated the path but consistently had build fails with both Unity and OVR 'Build and Run' due to the Gradle install not being 'valid'. I haven't yet found a way to make it valid.

    It's not likely that I've made any meaningful advancements in resolving this issue but I'm documenting it so others can avoid (or perhaps also go down) this rabbit hole.

    Android SDK Not Found
    https://forum.unity.com/threads/android-sdk-not-found.762506/
    https://forum.unity.com/threads/unable-to-locate-android-sdk.754667/

    Installing Gradle
    https://forum.unity.com/threads/gradle-build-failed.647581/
     
  10. MShotts

    MShotts

    Joined:
    Aug 8, 2019
    Posts:
    11
    Just to document more steps I took which also failed to resolve the issue:
    1. Under Project Settings->Player->Other Setttings, I updated the 'Minimum API Level' to Level 23. I found this recommendation in the comments for Andrew in VR's video on the Unity XR Interaction Toolkit.
    2. Under Project Settings->Player->XR Setttings, I switched from Multi to Single Pass.
     
    Rispat-Momit likes this.
  11. MShotts

    MShotts

    Joined:
    Aug 8, 2019
    Posts:
    11
    Aaaaand, I just realized that I'm a moron. I did not have the Oculus SDK enabled under Project Settings->Player->XR Settings. The build ran fine once I enabled 'V2 Signing (Quest)'.
     
  12. ericmg123

    ericmg123

    Joined:
    Aug 18, 2016
    Posts:
    6
    This fixed it for me.
    I was confused because my flow was:
    -Working fine
    -Tried tinkering with VRToolKit
    -Not working.

    I guess VRTK or maybe another imported asset reverted my SDK settings.
     
  13. Lhg

    Lhg

    Joined:
    Sep 1, 2014
    Posts:
    3
    I still have this issue. Oculus SDK 18 (tried 17 and didnt work). Unity 2019.4.6f (latest LTS). Everything compile and even run under Link/PC. But when the apk is generated for android and sent to the quest it displays a black screen.
     
    Johnny-Fuzz likes this.
  14. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    I'm having this issue right now on a new project using SDK 18 with Unity 2019.3.15f1. Yet I can use SDK 18 on a pre-existing project and it works fine. I've tried making the project settings, packages and assets store installs all match between projects. But I still can't figure out what it is that makes the old one work and the new project give me a black screen.

    This project was just created using the "3D" project type, and not using any LWRP or URP.
     
  15. GumiDev

    GumiDev

    Joined:
    Feb 28, 2020
    Posts:
    3
    I have same issue, have you found a way to fix this yet? Thank you in advance.
     
  16. nomadic

    nomadic

    Joined:
    Mar 4, 2010
    Posts:
    44
    Try Oculus -> Tools -> Create store-compatible AnroidManifest.xml
     
    Johnny-Fuzz and peterfiveeight like this.
  17. media_unity

    media_unity

    Joined:
    Nov 12, 2019
    Posts:
    2
    Was using Unity 2019.4.2f1 and updated it to 2019.4.7f1 (newest LTS) and my build works perfect. I've debugged for 2 days trying to build. I hope this advice helps somebody :D!
     
    AaronBacon and MR_Fancy_Pants like this.
  18. AaronBacon

    AaronBacon

    Joined:
    Sep 23, 2017
    Posts:
    3
    Had the same issue and this is the fix, I updated Unity and no more issues
     
  19. chantey

    chantey

    Joined:
    Mar 5, 2017
    Posts:
    49
    Me too! It seems that when you first check the checkbox it downloads a bunch of stuff but doesn't enable it.
     
  20. sarahmwhite

    sarahmwhite

    Joined:
    Mar 15, 2019
    Posts:
    1
    I had this same problem where it'd successfully build, but then wouldn't appear in my Oculus Quest headset.

    I found that having the Quest plugged into my laptop whilst building and then unplugging it once built worked and my build finally ran in my headset.

    Hopefully this works for you!

    I followed this tutorial on how to set-up the headset with Unity: https://circuitstream.com/blog/oculus-quest-unity-setup/
     
  21. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    84
    I'm having this issue on Unity 2020.2,0a18 on a Mac.
    Is there any progress on the issue?
     
  22. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    84
  23. vbmanoc

    vbmanoc

    Joined:
    Dec 8, 2021
    Posts:
    2
    For me it works when connected to Unity through the cable but when I deployed I get the black screen. Although the splash screen would show. The fix was changing the OvrCameraRig (search for it in your Project tab) asset. In the Inspector go to Quest Features, select Build Settings and uncheck Skip Unneeded Shaders.
    upload_2023-2-23_21-5-0.png
     
    ChristopherKerr, aleannox and DevDunk like this.
  24. Neomant

    Neomant

    Joined:
    May 3, 2020
    Posts:
    3
    @vbmanoc Thanks! This totaly fixed my problem! Skip Unneeded shaders button is broken!
     
    ChristopherKerr and aleannox like this.
  25. aleannox

    aleannox

    Joined:
    May 21, 2017
    Posts:
    1
    @vbmanoc thanks a lot! fixed the problem also for me :)
     
  26. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    488
    Unfortunately I am having the same issue. Once I built it, I get three dots on the screen, I have tried to uncheck the "Skip unneeded shaders" but nothing solves it.
     
  27. unity-chris

    unity-chris

    Unity Technologies

    Joined:
    Nov 10, 2022
    Posts:
    29
    Hi saifshk17, please file a bug report with a sample project and steps to reproduce, so we can take a better look at whats the problem.
     
    ChristopherKerr likes this.
  28. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    What caused the issue for me was the update of the Oculus XR Plugin to version 3.4.0. I reverted back to version 1.5.1 by changing the version number in the manifest file. Unity recompiled and everything worked perfectly in the build. UnityPackageManagerManifest.PNG
     
  29. Dev_premiumvr

    Dev_premiumvr

    Joined:
    Oct 15, 2023
    Posts:
    1