Search Unity

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

Help with app which can swap between Desktop and VR modes.

Discussion in 'AR/VR (XR) Discussion' started by rcazzy, May 7, 2020.

  1. rcazzy

    rcazzy

    Joined:
    Jun 7, 2014
    Posts:
    13
    Hello,
    I am attempting to set up a system whereby the player can choose between either VR or Desktop mode in the options menu. The Desktop mode is the default, and for the app to load without the headset in focus, I need to set the first XR SDK to "None".

    However, if I then try to do an XRDevice.isPresent check, it always returns false, as the "Oculus" SDK needs to be first in order to register as present. Here is the current setup:



    Is there any way I can check if an XR Device is connected without being the active SDK so I can switch platforms?

    I have tried using
    Code (CSharp):
    1. XRSettings.LoadDeviceByName( "Oculus" );
    but the XRDevice.isPresent still returns false after running the method.
     

    Attached Files: