Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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:
    66
    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:
    66
    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.