Showing results for 
Search instead for 
Did you mean: 

Downgrading the mobile OVRPlugin in Unity

Level 4
I'm porting an application built using the Native Oculus Mobile SDK (Java/Android) to Unity and ran into an incompatibility with the OVRPlugin version (VrApi). I've ported sections of the existing code base to java .aar plugins including a bluetooth plugin and a plugin for interfacing with 3rd party eye tracking hardware integrated in the GearVR. I'm using Unity 2017.3.1p4 and deploying to Android Marshmallow (API 23)

The eye tracking plugin includes an Android Activity that is used to calibrate the eye spacing profile etc. of the user. The calibration activity is contained in an Android Library (.aar) provided by the eye tracking vendor. To allow for calibration, I decided it would be easiest to just launch the calibration activity to perform calibration and then return to the Unity activity once calibration has finished. When I try to do this, the Activity throws an error because the version of the Oculus SDK that the plugin is trying to launch differs from the version that is included by the native Unity Oculus integration.

My question is... How do I downgrade the version of the Oculus SDK that Unity uses to match the version that the Java Android plugin needs to run? Secondly, does the native Java Android VrApi match exactly to the VrApi that is included in Unity builds as part of the native Unity integration and would it be possible for a single application to switch between rendering controlled by Unity and rendering controlled by the native Java SDK?

Level 4
Thanks for the response!

When trying to import the Oculus Utilities I didn't see any plugins contained within besides gamepad support. I thought that ever since native Unity integration the Oculus SDK, the Mobile SDK itself stopped getting included in the Oculus Utilities package?
When trying to launch the Android activity from Unity which uses the Oculus Mobile SDK I get the following message:

"The requested API version in ovrInitParms ( is not compatible with this version of VrApi Loader (1.12.0.(x))"

As referenced here:

Upon inspection of the OVRPlugin.aar it seemed that the VrApi Loader was contained within. I'm open to downgrading Unity (although it creates another issue because we're using gradle export w/ custom gradle config which doesn't exist in older versions). The biggest problem is that we don't know which version of Unity contains Oculus Mobile SDK I managed to find version but the mismatch still threw the same error. It also looks like it's impossible to download a specific patch number of the Oculus Mobile SDK off of the website. It only specifies 1.0.3 and not 1.0.3.x.

The following Unity compatibility documentation also doesn't specify the patch or sub-version number and helps to give an idea of where to look for the proper Mobile SDK version but it could still take days to find it (if it even ever got packaged with a version of Unity).

Any thoughts on what to do? We put in a lot of work get everything else working in Unity through a Java plugin but hit a huge roadblock with the calibration because it's so transactional and the system doesn't allow us to perform our own calibration. We have to use the Activity contained in the eye tracking module.

Thanks for any insight in advance!