Saturday, December 10, 2016

Google Cardboard Integration

Integration with Google Cardboard was not trivial, and I ran into several hiccups, but here is the process of getting Google Cardboard building and deployed with Unity (5.5.0f3)


  1. First install the Android Studio to get the Android SDK on your computer
  2. Next, download the Google VR SDK for Unity
  3. Create a new Unity Project
  4. Assets > Import Package > Custom Package
    1. Navigate to where you downloaded the Google VR SDK, select package
    2. Deselect the following
      1. Google VR > Demos
      2. Plugins > Android > gvr-permissionsupport-release.aar
      3. Plugins > iOS
    3. Click Import button
    4. Go Ahead with "API Update Required"
  5. There is at least one script with a compilation error
    1. Find the script error in the console, or just open GvrVideoPlayerTexture.cs
    2. Line 595 - add a "yield" before the "return false;"
  6. Allow extra import packages to be loaded "GVRBackwardsCompatibility"
  7. Delete the Main Camera
  8. Add a GvrMain prefab to your scene (this is your VR camera)
    1. Add other elements to your scene as desired
  9. File > Build Settings
    1. Select Android
    2. Player Settings > Identification > Bundle Identifier (update this field)
    3. Build
    4. When asked about Android 6.0 Platform requirements, click Continue
    5. If it complains about "Merging Android Manifests", you'll need to find the gvr-permissionsupport-release.aar file and manually delete it.

No comments:

Post a Comment