I’ve been receiving a lot of messages from people having problems building Daydream apps from Unity to their phone. So this is a quick post to go over the basics of doing just that, in 6 easy steps.
It’s been a while since I went over the basics of setting up Daydream and since then a lot has changed (for the better). The main change is we no longer need to add the GVRMain component to our scene. Unity now handles this natively, massively streamlining the development process.
From now on I’m going to be using a Google Pixel phone, the Nexus 6P will probably still work but I won’t be testing against that.
- The first thing to do is get yourself a Pixel phone (or some other Daydream certified phone) and make sure you’re on the latest version of Nougat.
- Head over to Unity’s Daydream Technical Preview site and read up on the latest info, or just scroll down to the bottom and download the latest installer. As of writing I installed version 5.4.2f2-GVR13
- Make sure you’ve got the latest Android SDK and Java JDK installed and linked in your Unity preferences. On a Mac: Unity>Preferences>External Tools. If there’s nothing there or you don’t have the latest click the download links and follow the steps to download JDK and Android Studio. On a PC the preferences are under the Edit menu.
- Now open up Unity, create a simple test scene with a cube and a camera. Open Build Settings: File > Build Settings under the Platforms list select Android and click Switch Platforms. Grab a refreshing beverage while it imports a bunch of stuff.
- In Build Settings > Player Settings > Other Settings select: Virtual Reality Supported and select Daydream from the drop down. Make sure you have Android 7.0 Nougat (or higher) selected in Minimum API Level otherwise Daydream will not show up and you’ll get some cryptic error about manifest files!! See diagram:
- Build and Run to your phone, then bask in the awesomeness of Cube App!
This will get you building to your phone with stereo rendering. If you want to use more Daydream functionality download the Daydream SDK and import the package into your project, it contains some demo scenes for you to try. For more Daydream dev related reading and help check out: