Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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:
    43
    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)
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    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:
    43
    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:
    958
    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:
    959
    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
  6. ualogic

    ualogic

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

    Murray_Zutari

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

    LuigiNicastro

    Joined:
    Feb 7, 2018
    Posts:
    27
    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!
     
  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:
    26
    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:
    10
    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.
     
  14. jeyalakshmi_chandrasekaran

    jeyalakshmi_chandrasekaran

    Joined:
    Mar 8, 2021
    Posts:
    9
    Thanks a ton!!
    Deleting the file, and restarting Unity worked like a charm. I've been searching for a solution, and this reply just saved my day!!!!
     
    KirillKuzyk likes this.
  15. DavidMapes

    DavidMapes

    Joined:
    Dec 7, 2021
    Posts:
    1
    Oh my...the same problem...Where is rhis file located??? i cant find/Thank you
     
  16. jeyalakshmi_chandrasekaran

    jeyalakshmi_chandrasekaran

    Joined:
    Mar 8, 2021
    Posts:
    9
    It's as mentioned above.
    In your unity project under Assets/XR/Loaders/NAME_OF_YOUR_XR_LOADER_Loader.asset

    The name of the XRLoader might be like Oculus.asset.

    1. Delete the file
    2. Close the project
    3. Check the XRLoader as needed under XR-Plugin-Management.
     
    ChristopherKerr likes this.
  17. Viitorcloud

    Viitorcloud

    Joined:
    May 22, 2018
    Posts:
    3
    Works in 2022 also
     
    KirillKuzyk likes this.
  18. VisheshG

    VisheshG

    Joined:
    May 27, 2022
    Posts:
    1
    Thank You so much it Helps and save my time ... thanks
     
    KirillKuzyk likes this.
  19. unity_5DD7FEB96C1C4102CEAB

    unity_5DD7FEB96C1C4102CEAB

    Joined:
    Jan 12, 2022
    Posts:
    1
    when I click loaders, nothing is in that file
     
  20. tmarlok

    tmarlok

    Joined:
    Feb 24, 2020
    Posts:
    6
    Hi All, I have a similar problem and could not solve it with the ideas above. I need help.

    My problem is the following: I cannot install XR Plugin management, I got many(55/148) of these errors:"

    The .meta file Packages/https://com.unity.xr.management/.../Unity.XR.TestSupport... does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete the .meta file and it will be recreated correctly"

    What I'm done so far (checked many forum posts):
    - tried to install XRPM from the project settings page and from the package manager too
    - tried to delete meta files, bulk, and one by one
    - added full access to the PackageCache folder
    - checked firewall rules
    - deleted the whole Library folder (at every try)
    - deleted the XR loader assets (when I somehow got there)
    - deleted the package-lock json
    - tried the "Help/Reset packages to defaults" menu in Editor

    I started with a fresh new VR template:
    - Win11
    - Unity 2021.3.8f1
    - XR Plugin Management 4.2.1

    I'm totally lost. Please help.

    Thank you in advance!
    Tamas (tas977)
     
  21. tmarlok

    tmarlok

    Joined:
    Feb 24, 2020
    Posts:
    6
    [SOLVED]
    Based on the log file documentation below, I've found another Cache folder with npm and packages folders inside of it.
    I deleted these folders and now it's working nicely! (I also deleted the project's Library folder)

    Unity - Manual: Log files (unity3d.com)
    my folder was here: c:\Users\{myusername}\AppData\Local\Unity\cache

    Best, T


     
  22. livj

    livj

    Joined:
    Feb 8, 2019
    Posts:
    10
    I got this issue now first and I also notices that it goes away if I uninstall XR Plug-in Management from the Package Manager and then install it again from the Package Manager - Then I can enable Oculus.
     
    ChristopherKerr likes this.