Setting up Unity for Gear VR development
After a full day of trying out different approaches and realizing there are many outdated blogs/videos on how to get Unity set up for Gear VR development I thought I would publish my own version on how I got it to work. Here goes.
Download Your Tools!
1. Download the latest Unity version. I’m using Unity 5.5.0b5 (yes the Beta Personal Release)
2. Download the Oculus Utilities for Unity 5 V1.8.0 from Oculus.
3. Download SideloadVR Device ID from Google Play (There’s a reason why, but I wont go into it here)
4. Download Oculus Platform SDK 1.8.0.
Once you have all the items you’ll need installed and unzipped, open up Unity and create a new 3D Project. Next Steps:
Set up Unity
1. Unzip Oculus Utilities and drag the “OculusUtilities.unitypackage” file into your “Assets” directory. Import EVERYTHING.
2. unzip Oculus Platform SDK and drag the OVRPlatformSDK_v1.8.0/Unity/OculusPlatform file into your “Assets” directory. Import EVERYTHING.
2. Add in 3D prefabs as normal.
3. Add in a OVRCameraRig Prefab from the Assets/OVR/Prefabs/ directory onto your scene.
Creating your Dev Key
Before you publish you’re going to need an Oculus Signature File and follow the below steps. This step will need to be repeated FOR EACH device you want to run the app on.
1. Open the Oculus Sig File Creator Tool
2. Open your SideloadVR Device ID app and retrieve your device ID. Very important that you use THIS device ID and no other.
3. Add the device ID into the Oculus Sig File Creator Tool and download the file.
4. Once you have the file add the file into the “Assets/Plugins/Android/assets” directory.
Once you’re ready to run your app, create the build using these steps.
1. Open up File -> Build Settings.
2. Within the “Build Settings”. Select “Android” from the “Platforms” pane and click “Switch Platform”.
3. On the right hand side select, “ETC2”, for Texture Compression.
4. Make sure you check, “Development Build”.
5. Click on “Player Settings” and within the “Other Settings” section check, “Virtual Reality Support” and make sure “Virtual Reality SDKs” is set to Oculus.
6. Finally make sure “Minimum API Level is 22 or higher.
Good luck and happy VR developing.