Search Unity

single Project w/XR (Oculus) and w/o XR does not run w/o Oculus attached.

Discussion in 'AR/VR (XR) Discussion' started by Ryuuguu, May 21, 2020.

  1. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    I have a project that compiles to Oculus & Standalone none XR, but I can not run it in the editor w/o the Oculus attached. Even a base New SCane with just a plain camera and directional light produces errors.
    Unable to Start Oculus XR Plugin
    Failed to load the display subsystem
    Failed to load input subsystem

    Is there a way to run a single project both with and without Oculus installed? I have
    Oculus XR Plugin 1.3.3
    XR Interaction ToolKit preview 0.9.4
    installed

    Cheers,
    Grant
     
  2. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    In the XR Management tab you can turn Initialize XR on Startup off.

    XRManagement.png

    The idea is that you compile 1 binary for Windows which is capable of both VR and Non-VR. The only thing you need to do in your app / game is a way to toggle VR.

    Also the errors you get for not having an oculus plugged in, are pretty much harmless. They do not obstruct code from running unless you explicitly handle it that way.
    On startup it expected to have an oculus plugged in, but errors just tell you it couldn't initialize as there is none plugged in.
     
    unity_zFXZPrrcQEU5Uw likes this.