Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Resolved Hello Cardboard crashes

Discussion in 'AR/VR (XR) Discussion' started by jamesvhyde, Jul 21, 2020.

Thread Status:
Not open for further replies.
  1. jamesvhyde

    jamesvhyde

    Joined:
    May 31, 2017
    Posts:
    6
    I would like to deploy a Unity project to Google Cardboard. However, I can't get the Hello Cardboard example to run. It deploys as a black screen on my device, and then crashes after a few seconds. I managed to attach a debugger using Android Studio and captured a stack trace at the point of the crash.

    I was following the instructions on this page: https://developers.google.com/cardboard/develop/c/quickstart
    I tried the Android NDK version of Quickstart/Hello Cardboard, and it runs correctly on my device. However, the Unity version does not.

    This is my first time trying to deploy a Unity project to an Android device. I don't think I have any legacy options set or conflicting VR builds.

    Any tips or ideas?
     
  2. jamesvhyde

    jamesvhyde

    Joined:
    May 31, 2017
    Posts:
    6
    I narrowed this down to the Tracked Pose Driver component. If I delete that component, the program runs on the device. Of course without that component, it's not a VR app.
     
  3. jamesvhyde

    jamesvhyde

    Joined:
    May 31, 2017
    Posts:
    6
    I ended up building my own version of a Tracked Pose Driver component. It's not great, but it works. Basically I put in two cameras, one slightly left and one slightly right, each covering its own portion of the viewport. I combined this with checking the Attitude Sensor input from the phone. I had to look up how to get the orientation correct; I copied somebody's code that I found. The result is attached as a package.
     

    Attached Files:

    sateyr likes this.
  4. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    After speaking to the team they came back to me with the following:

    "Google has released a Google Cardboard XR Plugin for Unity here. Make sure you are using that, and if you have any issues the Google team has requested you open issues on Github here where their team will address."

    As we no longer support Cardboard I'm going to close this thread, I hope the response has helped!
     
  5. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    346
    Perhaps you could forward the forum link to the Google open source developers so the can reply themselfs?
     
Thread Status:
Not open for further replies.
unityunity