Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Tingyou's avatar
Tingyou
Honored Guest
4 years ago
Solved

[Oculus] OVRPlugin not found when I build the project with bachmode

Hi, I can't find OVRPlugin when I use bachmode to build my project, but it works great without bachmode.
I found that there is an error in the building process. Does anyone has a solution to it?
 
I use Oculus Integration SDK v44 and Unity 2021.3.10f1
Here is the log, thanks in advance
 
```
NullReferenceException: Object reference not set to an instance of an object
  at OVRDeviceSelector.get_isTargetDeviceQuest () [0x0000d] in D:\Oculus\VR\Editor\OVRDeviceSelector.cs:45
  at OVRDeviceSelector.get_isTargetDeviceQuestFamily () [0x00000] in D:\Oculus\VR\Editor\OVRDeviceSelector.cs:35
  at OVRGradleGeneration.OnPostGenerateGradleAndroidProject (System.String path) [0x00010] in D:\Oculus\VR\Editor\OVRGradleGeneration.cs:215
  at UnityEditor.Android.AndroidBuildPipelineInterfaces.OnGeneratePlatformProjectPostprocess (System.String path, System.Boolean strict) [0x00026] in <99feab6f3db6407493924fe4a179a95b>:0
```
  • I found the solution to it is to add xr loader settings in the EditorSettings.asset just like below


    m_configObjects:
    com.unity.xr.management.loader_settings: {fileID: 11400000, guid: b78ed11210b69be4d96370420ce80322,
    type: 2}

1 Reply

Replies have been turned off for this discussion
  • Tingyou's avatar
    Tingyou
    Honored Guest

    I found the solution to it is to add xr loader settings in the EditorSettings.asset just like below


    m_configObjects:
    com.unity.xr.management.loader_settings: {fileID: 11400000, guid: b78ed11210b69be4d96370420ce80322,
    type: 2}