cancel
Showing results for 
Search instead for 
Did you mean: 

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

Tingyou
Honored Guest
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
```
1 ACCEPTED SOLUTION

Accepted Solutions

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}

View solution in original post

1 REPLY 1

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}