Search Unity

Bug Black screen on oculus quest 2 URP build when using oculus SDK

Discussion in 'VR' started by wenkly, Jan 11, 2024.

  1. wenkly

    wenkly

    Joined:
    Sep 4, 2014
    Posts:
    20
    We just upgraded project to URP and have problems with oculus SDK. It turns out that any version of it causes black screen after launching built game. You can hear that you are loaded in main menu and hear all sounds but the screen remains black and console spams with error:
    Code (CSharp):
    1. OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state
    Tried downgrading to some versions but none of it worked. Removing oculus SDK works and the error in not appearing anymore. Also it works without URP on same setup. Happens with:
    - Meta XR Core SDK and Meta XR Platfrom SDK (version 60.0.0 and 59.0.0)
    - Oculus integration v57, v50, v42

    Things we are using:
    - Unity 2022.3.16f1
    - URP 14.0.9
    - Oculus XR Plugin 4.1.2
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,051
    Did you follow the meta quickstart guide?
    Some settings can cause this.

    Also make sure the quest is updated
     
  3. wenkly

    wenkly

    Joined:
    Sep 4, 2014
    Posts:
    20
    Hi, Thanks for replying. We've done exactly the same as in the guide. Up until this point we've used OpenXR as our XR environment and we had a black screen when launching our app. After switching it to Oculus (as mentioned in the guide), the skybox was black and all of the objects on the scene were pink. Materials use unmodified lit and unlit shaders. The above-mentioned scene, both in editor and PC built looks fine, the issue appears only on andorid builds when using Oculus SDK. It seems fine without it
     
  4. wenkly

    wenkly

    Joined:
    Sep 4, 2014
    Posts:
    20
    We finally managed to find the reason of our problems. It was caused by checked "Skip Unneeded Shaders" in Oculus Project Config. Unchecking the checkbox has fixed it.
    upload_2024-3-7_12-0-48.png