Search Unity

Question Can't get passthrough to work on Quest 2

Discussion in 'VR' started by virtualjay, Sep 9, 2022.

  1. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    I'm trying to make a simple test app just to get passthrough to work. No frills, just a scene that shows passthrough. I've followed several tutorials, though it's rough since so many things have changed since they've all been written. I've tried both v41 and v43. The settings I'm changing are:
    OVRCameraRig -> OVRManager -> General : check both Passthrough Capability Enabled and Insight Passthrough -> Enable Passthrough
    Added OVRPassthroughLayer component to OVRCameraRig

    CenterEyeAnchor -> Camera : set Clear Flags to Solid color and Background Color to black with alpha 0

    I have also tried Build Settings -> Android -> Texture Compression = ASTC

    As far as I can tell, those seem like all that should be necessary. I'm using 2020.3.38 LTS and not using URP. I've made sure it's using Linear Color Space, IL2CPP, Arm64, and Vulkan has been removed (following at least one tutorial). I've also tried different version of Android, from 23 to 29. I've tried Underlay and Overlay. So far nothing has worked.

    I'm testing this on a native apk built. The scene works fine (just threw some cubes in it), but the background is black (experimented changing Background Color, and that's what's being shown).

    Oddly enough, I downloaded a few different apps from App Lab the show passthrough. Most of them also showed a black screen, but one of them actually did show passthrough: The World Beyond. Unfortunately, when trying to build The World Beyond from source, I got the notorious stuck gradle problem and was never able to fix it. I also tested other passthrough scenes included with OVR, but they also just showed black where the passthrough should be.

    Does passthrough work on an Unknown Sources app normally? Or does it only work with signed apps, or apps from the Store/App Lab? I would think it'd have to work without all that stuff just so you could get started developing it. But I'm at my wits end here. I don't know what else to try to get this thing working.
     
    Last edited: Sep 9, 2022
  2. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    Well, to answer my own question for posterity, the thing I had missed was this:
    upload_2022-9-9_9-27-51.png

    That checkbox on the far right needs to be done for passthrough to be supported. I assume some of the apps I tried were built before Oculus made it mandatory to use OpenXR to support passthrough.

    Hat tip to Tony's article at https://skarredghost.com/2021/10/01/how-to-passthrough-ar-oculus-quest-unity/ that led me to find this. They've rearranged the menus a bit from when he wrote it, but it was on point.
     
  3. Paulchen29

    Paulchen29

    Joined:
    Jan 28, 2014
    Posts:
    1
    Thank you very much my dear! I was facing the same issue yesterday! :)
    Have a great weekend and tons of fun with your project!
     
    virtualjay likes this.
  4. wechat_os_Qy01eDJfSV7CWSHuAPwDqgMCA

    wechat_os_Qy01eDJfSV7CWSHuAPwDqgMCA

    Joined:
    Aug 4, 2022
    Posts:
    8
  5. Shezraan

    Shezraan

    Joined:
    Mar 23, 2023
    Posts:
    6
    What's the equivalent for Oculus SDK v56 and Unity 2022.3.8f1?

    I am not getting Meta Passthrough API for Oculus SDK v56 to work in Unity 2021.3.8. I have enabled all the relevant switches based on the top results and the Oculus pages on Passthrough API. I'm stuck in a corner with this error which appears after I exit Play Mode in the editor:


    Warning-XR Device was switched during runtime with overlays still enabled. When doing so, all overlays constructed with the previous XR device must first be disabled.
    UnityEngine.Debug:LogError (object)
    OVROverlay:LateUpdate () (at Assets/Oculus/VR/Scripts/OVROverlay.cs:1199)


    I can safely say that I don't know what an XR device is in this context and why it would show up as switched. I'll begin by inspecting that line of code.
     
    Last edited: Sep 4, 2023
  6. PsiconLab

    PsiconLab

    Joined:
    Oct 9, 2017
    Posts:
    27
  7. PsiconLab

    PsiconLab

    Joined:
    Oct 9, 2017
    Posts:
    27
    I've had the passthrough workin with Unknown Sources and using URP custom shaders before.
     
  8. Sindbad-von-See

    Sindbad-von-See

    Joined:
    Jun 23, 2020
    Posts:
    4
  9. ela_shell

    ela_shell

    Joined:
    Mar 16, 2021
    Posts:
    4