Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Editor and Virtual Desktop

Discussion in 'VR' started by Deleted User, May 2, 2020.

  1. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    Using 2021.2 it is no longer necessary to run bat files.

    If I set XR plugin to OpenXR, fire SteamVR before I press "play", then the picture appears in my HMD as soon as I press "play".

    You'll probably still need to run that command if you're targeting oculus runtime, though.
     
    johanneskopf likes this.
  2. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    This path should point to the Unity project which you want to start debugging in VR. In my case the project was named "proj-stardew-vr-health" and I stored the project in "C:\Repos\" thus the command was "proj-stardew-vr-health -cloudEnvironment". Just update this path according to your project. You can find this path in the Unity Hub (see the following image):

    upload_2021-12-8_14-31-20.png
     

    Attached Files:

  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    One other thing...

    Long pressing "Select" button on the left controller will bring up Virtual Desktop window, where you can select "Switch to desktop". Not sure if it would be faster than closing steamvr, though.

    You can also install OVR Toolkit, in that scenario you'll be able to bring up desktop while in VR by pressing both grips (I think twice).
     
  4. nima8

    nima8

    Joined:
    Nov 28, 2019
    Posts:
    10
    Does Virtual Desktop and Unity Editor work with mac?
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    Virtual Desktop does not support MacOS.
     
  6. nima8

    nima8

    Joined:
    Nov 28, 2019
    Posts:
    10
    Virtual Desktop DOES support macOS but I did the research it can not play VR in Unity Editor all it can do stream your view to VR headset.
     
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    "PCVR game streaming requires a VR Ready PC (GTX 970) running Windows 10"
    "Frequently Asked Questions
    Can I play SteamVR or Oculus Rift games?
    Yes but you need a VR ready PC running Windows 10 (it won't work on a Mac). "


    That means it does not support MacOS for anything useful that includes working in unity editor.

    This is not VR desktop site, anyway. They have email/discord, ask your questions there.
     
  8. YanivAvrahami

    YanivAvrahami

    Joined:
    Jun 26, 2016
    Posts:
    51
    Does VD support hand tracking too?
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    There's a video and articles claiming that it does, but I never used it.
     
  10. YanivAvrahami

    YanivAvrahami

    Joined:
    Jun 26, 2016
    Posts:
    51
    I asked that question in the VD Discord and a dev told me that VD doesn't support hand tracking right now to use with the Unity Editor.
     
  11. sikaar

    sikaar

    Joined:
    May 10, 2019
    Posts:
    3
    Adding here my experience as I got it to work like a charm - And as many said before this is really amazing and by far cutting down the cost of VR dev (at least for prototypers and beginners)

    Setup :
    1) Oculus Quest 2
    2 )Virtual Desktop ( to be bought from Oculus Store )
    3) Shadow Booster
    4) Unity Editor v 2020.3.16f1 ( to be downloaded from the archives)
    5) Create a Sample VR project (here i used the default VR Core one) - just add the Project Settings - XR Settings - Oculus
    6) Close Unity Hub , Unity Editor , Steam VR, Oculus App
    7) Ensure Virtual Desktop Streamer is Running
    8) Execute this command from the windows terminal ( NB all path need to be updated to match your versions and local config )
    Code (Boo):
    1. ''C:\Program Files\Virtual Desktop Streamer\VirtualDesktop.Streamer.exe'' ''C:\Program Files\Unity\Hub\Editor\2020.3.16f1\Editor\Unity.exe'' -projectpath ''C:\Users\Shadow\Documents\Unity\Shadowremotevrvd -cloudEnvironment''
    9) run the game by clicking the play button (works from either the controllers or the mouse)
    10) Enjoy ( and debug this missing GameObject reference :D )
     
    ROBYER1 likes this.
  12. ak2001

    ak2001

    Joined:
    May 7, 2022
    Posts:
    6
    This is working for Unity version 2020.3.16f1 but not 2020.3.5f1. It's just opening Unity Hub. Any idea why?

    EDIT: Fixed this by removing the whitespaces in project name, although the preview is still not working in Oculus VD
     
    Last edited: Jul 27, 2022
  13. ak2001

    ak2001

    Joined:
    May 7, 2022
    Posts:
    6
    I can't get this to work with Oculus Integration and Unity 2020.3.27f1

    I followed all your steps, but when I press Unity "Play Scene" inside the Oculus Virtual Desktop, the preview is not playing on my Oculus, i.e. hand/head tracking is not working.

    When I build the project to my Oculus the old-fashioned way, with a cable, everything is working, even though it takes 2-3 minutes.

    Can you please help?



     
  14. wechat_os_Qy04qOZcw1zlF9Hfk_izF6FZU

    wechat_os_Qy04qOZcw1zlF9Hfk_izF6FZU

    Joined:
    Oct 8, 2022
    Posts:
    1
    I have the same problem.
    The bat script not work.
    I have tried 2121.3.11f1 and 2022.1.20.f1
     
  15. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    Starting virtual desktop on quest 1. After it logs onto my PC I then just press play in unity project using oculus under open xr. Plays wireless to quest1 like a charm. Quest and pc should use the same lp segment. (same wifi net). Struggling with the pico4 openxr plugin though. No prob to get an apk running locally transfered with USB cable but still no success in starting desktop wireless directly from unity to pico. Gets picture and hmd but no Pico controller functionality. If anyone gets pico4 desktop from unity editor with
    Controllers working please tell. Got steam to work nice with Pico though
     
  16. franMx

    franMx

    Joined:
    May 27, 2013
    Posts:
    30
    Hello guys, virtual desktop is supported only in certain unity versions? If possible, would mind on a list of working versions?
     
  17. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,117
    I followed this guide, but the scene won't open on the headset when I press Play.
    I also get a "warning" in the console:
    I tried running both with and without the Oculus app running. I always get this error and the scene never opens on the headset.

    P.S. Running Unity 2022.2.0f1
     
    Last edited: Dec 19, 2022
  18. R0dluvan

    R0dluvan

    Joined:
    Nov 16, 2016
    Posts:
    10
    I'm also running afoul of this issue. I was on Unity 2020 and everything worked just fine using the custom command line described in this thread, but in 2021.3.9f1 it just refuses to work. I tried neginfinity's suggestion with going through Steam VR, and got it to work, but it's not a viable solution due to horrible lag.

    I'd like very much to hear if anybody has been able to apply the command line solution to 2021 or later!
     
  19. Deleted User

    Deleted User

    Guest

    I would also be interested to know if anyone was able to make this work with Unity 2021.

    Very tired of having to do a full PC reboot for that Quest Link to work...
     
  20. R0dluvan

    R0dluvan

    Joined:
    Nov 16, 2016
    Posts:
    10
    Today, to my bewilderment and delight, I tried to run an old project in Unity 2022.3.0f1, which I was able to run from the Editor tetherless in 2020.3.48f1 but not in 2021 - and it worked again, right out of the box! I had Virtual Desktop running on the Quest (1), VD streamer on the PC, and didn't use any bat files or command line arg shortcuts at all.
    Unity seemed to start up Steam VR automatically, and the awful lag I'd previously experienced using Steam VR wasn't noticeable. YMMV.