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. Dismiss Notice

Bug Quest 2 PCVR with Virtual Desktop + SteamVR: Controllers Not Working?

Discussion in 'VR' started by Xander-Davis, Nov 5, 2022.

  1. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    With the Oculus Quest 2, even if I use the vanilla VR Project from Unity straight out-of-the-box, I can successfully go into VR directly from even the Editor in one click via Virtual Desktop + SteamVR (to leverage PCVR streaming for near unlimited graphics potential in my projects), but the controllers don't work.

    The models for the controllers are just on the floor at 0,0,0 under the Player.

    I had the same result with VR Framework too.

    Has something broken for Unity's ability to do PCVR?

    I used to do this all the time, no problem directly out of a new Project with a simple install of VR Framework. Any tips for how to resolve?
     
    Last edited: Nov 5, 2022
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,396
    If you install vr framework, make sure to update all the xr packages afterwards.

    Also what xr plugins do you use? I suggest OpenXR, since that works with all VR runtimes. Make sure you select SteamVR as openxr runtime however
     
  3. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Yeah, regarding VR Framework here are my steps:

    NOTE: I am working *in* Virtual Desktop the entire time (Gaming Room Environment) on Oculus Quest 2.

    1) New project (Built-In)
    2) Import VR Framework (current: 1.82)
    3) Select Import to popup warning it's a complete project
    4) Select Install/Upgrade package manager dependencies
    5) Finally Import the VR Framework package
    6) I get this error in the Console:
    Library\PackageCache\com.unity.xr.oculus@1.3.4\Editor\OculusBuildProcessor.cs(89,60): error CS0619: 'AndroidSdkVersions.AndroidApiLevel19' is obsolete: 'Minimum supported Android API level is 22 (Android 5.1 Lollipop). Please use AndroidApiLevel22 or higher'
    7) I fix this by updating the Oculus XR Plug-In via the Package Manager (update to 3.2.1)
    8) Click 'Yes for these and other files that might be found later' in the Script Updating Consent pop-up
    9) Under BNG Framework / Scenes, I open up the XR Demo scene.
    10) Checking Project Settings under XR Plug-in Management, Oculus is the only one installed so far.
    11) I toggle on Oculus.
    12) I press Play
    13) SteamVR launches and my environment goes into the XR Demo in VR from the Editor, but I have no controller activity, hand models on the floor under me at 0,0,0.

    Alright, next I'll try OpenXR.

    14) Under Project Settings, XR Plug-in Management, I toggle off Oculus and toggle on OpenXR.
    15) I select OpenXR and select SteamVR as the Play Mode OpenXR Runtime.
    16) I press Play, it goes into VR, but still no controller activity.
    17) Under OpenXR, I add an interaction profile to the list: Oculus Touch Controller (since I'm using Oculus Quest 2 Touch controllers).
    18) I press Play: that worked!

    Streaming the XR Demo from the Unity Editor within Virtual Desktop is very jittery, but upon creating a build, the .exe is smooth as butter.

    I'm not exactly sure why this all worked this time, because this was about my sixth attempt at doing exactly this. But these steps worked. Hopefully writing out these steps will have helped others. Thanks!
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,991
    if its the old steamvr plugin:
    steam needs to be running. (and steamvr window should show the controller and headset in that window, if not close steamvr, it starts again on play)

    if its unity xr, had similar issue where hands were on the floor, fixed by:
    Project Settings/XR plugin management/OpenXR/Interaction profiles
    or checked with Window / XR / OpenXR / Input validation

    or missing "XR Interaction Manager" and "Input action Manager" and there needs assigned input action assets
    (*this was some time ago, so might have changed already..)