Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

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

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

  1. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    382
    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:
    266
    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. hawken

    hawken

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

    Thanks