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

How to make app support Desktop and VR?

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

  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    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:
    108
    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.