Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to make app support Desktop and VR?

Discussion in 'VR' started by HonorableDaniel, Sep 12, 2019.

  1. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,828
    I have an app for desktop/mobile and I would like it to run on VR devices too (like the Quest). How do I go about making my app support both targets?
     
  2. Corysia

    Corysia

    Joined:
    Mar 14, 2018
    Posts:
    75
    I looked in to doing this some time back and I haven't yet settled on a design for it.

    But my plan was basically to have a separate set of player controllers based on whether or not VR was enabled. I got as far as either using an OVRPlayerController if an XR.Device was detected, or using a FirstPersonController if not. I realized that my entire UI and placements of a Canvas would be affected, depending on the mode.

    I'd decided that my app was either going to start in VR or non-VR, I would not support switching while the app was running. And I got a small prototype of that working. But I left it at that point.