Search Unity

Cardboard support on Gear-compatible device

Discussion in 'AR/VR (XR) Discussion' started by MBlomme, Jul 17, 2018.

  1. MBlomme

    MBlomme

    Joined:
    Dec 18, 2017
    Posts:
    11
    Hi,

    I am currently developing an app with a non-VR mode and a cardboard mode (activated through a toggle VR button). In the build settings I put the "None" SDK and the Cardboard SDK from GoogleVR, I also put the Oculus SDK for the Oculus Go builds but I remove it when I build for classical Android devices.
    My issue is that even if I remove the Oculus SDK, when I launch the app on a Gear-compatible device (I tried on Galaxy S7 and S8) the app asks to put the device in a Gear VR headset...
    How can I disable the need of a Gear VR headset to launch the app and work only with a Cardboard VR type ?

    Thanks
    M. Blomme
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Did you happen to also add any GearVR/Oculus dev assets to your project? Basically, something being merged into your manifest that is setting the Oculus GearVR support flag that causes this screen to be activated.
     
  3. MBlomme

    MBlomme

    Joined:
    Dec 18, 2017
    Posts:
    11
    Thanks for your answer !
    Yes I have the Oculus dev assets because I want to be able to deploy the app on Oculus Go...
    So if I correctly understand I have to remove the Oculus assets before building to be able to do what I want ?
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Yeah, you may have to. This is an unfortunate side effect of Oculus' deep integration with Samsung that we have no real control over. Oculus and Samsung are working on a fix for this but I have no ETA or other information on that.
     
  5. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    If you have the Oculus assets, the main asset that is going to effect the build is the OVRPlugin.aar inside fo the Assets/Plugins/Android folder. If you just remove that and the Oculus SDK from the Virtual Reality Supported SDKs list in the player settings, you should be able to build without Oculus effecting the apk.
     
  6. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    This is why it's important to have a Unity Native VR API. I've build a GearVR application all based on the native unity VR code which was a breeze to port to Google Cardboard, it was all a matter of swapping the API's in the build settings. However there are still a couple of features missing to fully write functionality for the Oculus Go controller.

    If Unity manages to get a much native api to work with all the VR headsets, then you should not have a single problem. I can't wait for that full native support, but I do read they're still working on certains things.
     
    DBarlok likes this.