Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Editor not disconnecting from SteamVR when game-mode ends

Discussion in 'VR' started by violgamba, Sep 12, 2023.

  1. violgamba

    violgamba

    Joined:
    Jun 3, 2020
    Posts:
    3
    I'm working on a VR game in Unity 2021.3.30f1 (the current LTS). I'm using OpenXR with XR Plug-in Management. I'm playtesting in the Unity Editor with a Quest 2 that is connected to SteamVR through Virtual Desktop.

    The issue:
    When I enter game-mode in Unity (with SteamVR already running) the game connects to SteamVR just fine. However, when I exit game-mode, it doesn't seem to disconnect from SteamVR. Here are the symptoms of this:
    • SteamVR continues displaying "Now Playing <my unity project name>".
    • My headset continues to show that it's waiting for the game to continue.
    • The following errors are added to the Unity console:
      • [XRInputSubsystem] A device disconnection with the id 1 has been reported but no device with that id was connected.
      • [XRInputSubsystem] A device disconnection with the id 2 has been reported but no device with that id was connected.
      • [XRInputSubsystem] A device disconnection with the id 3 has been reported but no device with that id was connected.
    • Subsequent runs of game-mode in the Unity editor run the game in the editor, but not in SteamVR.
    • Quitting and restarting Unity clears this issue: SteamVR's "Now Playing" is cleared, my headset goes back to SteamVR home and running game-mode in the Unity editor loads the game in SteamVr once more.

    This issue occurs reliably; each playtest with VR requires restarting Unity. I've tried changing the VR plugin-provider from OpenXR to Oculus with pretty much the same result. I'm working on an already existing game, so restarting the project is not an option.

    Thanks for any help that you can provide.
     
    Ony likes this.