Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Hybrid app “none” XR setting doesn’t start in VR mode on Mirage

Discussion in 'Daydream' started by enhawk, Jan 14, 2019.

  1. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    Google says that unity recognises daydream devices with XR set to none as default and daydream as the next in the XR list. However when I tried this on the Mirage, is showed a black screen in 2D mode.

    Anyone had any luck with auto detecting VR at the Unity splash screen stage? If I set daydream as the primary XR setting, the app will start up in VR mode on mobile (the unity logo will be in VR).

    https://developers.google.com/vr/develop/unity/guides/hybrid-apps

     
  2. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    How are you launching the app on the Mirage?

    If you're starting it via the launcher in VR, the app should get the
    android.intent.extra.VR_LAUNCH
    intent extra and start in VR mode.

    If you're launching it via adb (or having unity automatically launch it), you won't be getting this intent extra so it will start in 2d mode. If you want to launch via adb you'll have to start it like this (note: untested, but it's the general gist.. see am man page for details):

    adb shell am start -n com.package.name/com.package.name.ActivityName --ez android.intent.extra.VR_LAUNCH true
     
  3. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    ah! I was just launching via Unity. Tried to open the app from the launcher and it worked fine!

    Thanks