Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

XR Plugin Management - Can't Enable Plugin

Discussion in 'AR/VR (XR) Discussion' started by ExodusOTH, Aug 31, 2020.

  1. ExodusOTH

    ExodusOTH

    Joined:
    Nov 30, 2017
    Posts:
    37
    I've run into this bug previously when attempting to add Valve's OpenVR XR Plugin, however assumed that when it didn't work it was due to a problem on their end, as the Oculus XR Plugin worked fine. I no longer believe that the bug was related to Valve's XR Plugin, as I am currently experiencing it with the Oculus XR Plugin as well.

    The Bug:
    When attempting to tick the check box within XR Plugin Management to enable a given XR Subsystem (after downloading it from the Package Manager of course), it loads for a second as though compiling something, and then never actually enables the XR Subsystem. The box remains unticked.

    Horrible Solution:
    One thing that I have tried in the past and it worked (however it is downright disgusting of a workaround), is create an empty project, and then copy 100% of your assets from the broken project to the working project, and allow it to spend however long to import everything. This fixes the bug, however is not scalable with larger sized projects (mine is at ~50GB and that still took 2-3 hours and I know there's plenty of projects much larger)

    The part that sucks is that I have been unable to replicate this on a fresh project (hence why copying the assets over fixes the problem), however it happens randomly on my own project (when enabling/disabling different XR Subsystems). I'm curious if anyone has this problem as well, or knows what causes it/how to fix it.

    The two XR Plugins that I use are the Oculus XR Plugin and Valve's OpenVR XR Plugin (currently only on their GitHub [https://github.com/ValveSoftware/unity-xr-plugin]).

    Attached:
    This link is to a video showing my current situation, in which I can enable and disable OpenVR, but cannot do the same with Oculus, despite them both being downloaded. (Reminder: I have experienced this both ways around, where I can enable one but not the other)
     
    Sab_Rango likes this.
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    945
    I can't tell from the video but did the Oculus plugin actually install (i.e. does it show as installed in Pack Man) before you attempted to enable it? Can you put together a small project that reproduces that problem? If so, can you file a bug with that project attached?
     
  3. ExodusOTH

    ExodusOTH

    Joined:
    Nov 30, 2017
    Posts:
    37
    Yes the Oculus plugin did/was installed prior to me attempting to enable it. The unfortunate thing is that I am unable to reproduce the problem, as with a clean build it is fine (thus why moving all my asset files into a clean build fixes the problem - until it randomly happens again). I know it's damn near impossible to fix if it's not reproducible because you guys have no clue where to start.

    Here's a link to me showing my current versions of plugins, in case anything stands out.


    Unity Version: 2019.4.9f1
    XR Plugin Management: 3.2.13
    Oculus XR Plugin: 1.4.3
    OpenVR XR Plugin: 1.0.1

    Are there any logs that might be useful to check for when I click the tick box?
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    945
    You could check the Editior log immediately after this happens. Not sure what to look for there but anything looks interesting zip it up, attach it to this post and I'll see if I Can make heads or tails of it.
     
  5. KirillKuzyk

    KirillKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    754
    I had a similar issue with other XR Providers (ARKit, AR Foundation Remote, ARCore) and this solution will probably work for Oculus XR Provider too:
    1. Delete the file Assets/XR/Loaders/NAME_OF_YOUR_XR_LOADER_Loader.asset.
    2. Enable your XR Provider in XR Plug-in Management window.
     
    Last edited: Dec 3, 2020
    Eddi_7, lrb, dprestonpeek and 9 others like this.
  6. ualogic_

    ualogic_

    Joined:
    Oct 15, 2018
    Posts:
    7
    Saved my day. Thanks a bunch!
     
    KirillKuzyk and bisiyo like this.
  7. Murray_Zutari

    Murray_Zutari

    Joined:
    Jun 1, 2017
    Posts:
    33
    This worked for me, thanks!
     
    KirillKuzyk likes this.
  8. LuigiNicastro

    LuigiNicastro

    Joined:
    Feb 7, 2018
    Posts:
    14
    This works! Thank you
     
    KirillKuzyk likes this.
  9. dprestonpeek

    dprestonpeek

    Joined:
    Nov 5, 2019
    Posts:
    1
    This worked for the PlayStation VR plugin as well, just had to restart Unity after deleting the loader file. Thanks!
     
    lrb and KirillKuzyk like this.
  10. smile_caocao

    smile_caocao

    Joined:
    Jun 3, 2021
    Posts:
    1
    Hey man, Could you let me know how to delete the file ? where is the file located ?
    Many thx!!!
     
  11. lrb

    lrb

    Joined:
    Jun 21, 2014
    Posts:
    22
    Only worked for me deleting and restarting the Unity! Thank you guys.
     
  12. Eddi_7

    Eddi_7

    Joined:
    Nov 19, 2018
    Posts:
    4
    <3
     
  13. HamzaMushtaq

    HamzaMushtaq

    Joined:
    Sep 24, 2017
    Posts:
    9
    Hi amazing people i need help in toggle between AR Core and Cardboard XR plugin. my app is having both functionalities. is their any way to do toggle between AR and VR in game .
    Thanks in advance.
     
unityunity