googlevr / gvr-unity-sdk

Google VR SDK for Unity
http://developers.google.com/vr/unity/
Other
2.71k stars 1.09k forks source link

GearVR and Daydream Conflicts when OVRPlugin.aar library is included in build #794

Open sterlingcrispin opened 6 years ago

sterlingcrispin commented 6 years ago

I just wanted to document this for posterity in case that anyone else had this issue, my app builds to both Daydream and GearVR and for a few of the phones that was not an issue.

However the Note 8 (and presumably any other phone which are compatible with both systems) I had a fatal bug where a Daydream configured build of the application would cause a GearVR prompt to appear before the app did. This modal prompt demanded the user install some oculus things and essentially would never run the Daydream app.

in Player Settings > VR SDK's I had only included the Daydream SDK

The problem was caused by the OVR/Plugins/ directory and a number of files within it. I just deleted the entire directory and rebuild the app without any problems. Those being present in a Daydream build will cause the app to fail to run properly on a phone that's GearVR compatible .

Found using:

Additional comments: feel free to close this issue as I've resolved it but I think contacting Oculus and sorting out this issue would be to everyones benefit

fredsa commented 6 years ago

@sterlingcrispin Thanks for reporting this issue.

As a workaround, you can temporarily uncheck the Android platform import setting for the Assets/OVR/Plugins/<version>/Android/OVRPlugin library when building the Daydream / Google VR version of your app.

Note also that when you're building the Daydream / Google VR version of your app that you'll want to:

I was able to reproduce your issue on a Samsung Galaxy S8+ with the Oculus Utilities for Unity 1.20.0 unitypackage imported into my project. Do you know if it was the Oculus Utilities for Unity, or some other library which caused the problem for you?

fredsa commented 6 years ago

I filed Unity case 973572 to track your issue and see if there's anything Unity can do to workaround the library issue.

sterlingcrispin commented 6 years ago

Hey @fredsa thanks! Unchecking that is definitely a better solution than deleting it thanks for that tip I forgot that was an option. Yeah I'm pretty sure its the Oculus Utilities for Unity that was doing it

fredsa commented 6 years ago

Marking this as a Unity bug for now.

delphinius81 commented 6 years ago

What version of the Oculus SDK were you using? Unity Tools SDK 1.15 to 1.18 had issues with projects that included the OVR code clobbering the fact that Oculus was not listed in VR devices - it would make changes to the generated manifest marking the application is a gearvr application instead of google vr.

rusmaxham commented 6 years ago

@sterlingcrispin, I wrote a build processor script that should alleviate this issue of having the Oculus Utilities package installed in a project that supports Oculus and Daydream.

Drop it in an Editor folder. At build time, it will check current VR SDKs and disable GoogleVR or Oculus native plugins that aren't needed for the current VR SDKs. It will re-enable the plugins at the end of the build.

This appears to work for me on a Galaxy S8. Please give it a go.

fredsa commented 5 years ago

We're still working with Unity to resolve the conflict. Unfortunately, no further updates at this time.