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 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.
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!