Hello Cardboard crashes

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: Quickstart for Google Cardboard for Android NDK  |  Google for Developers
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?

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.

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.

100000001056458–714128–HeadCamera.unitypackage (111 KB)

1 Like

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!

Perhaps you could forward the forum link to the Google open source developers so the can reply themselfs?