This is an old revision of the document!
Author: Blake Hament Email: email@example.com
Keywords: VR, Gear, Samsung, Unity, 360 video
This tutorial will help you view projects from unity on your Samsung Gear VR device. Unity can be used to develop immersive virtual reality experiences, and Samsung Gear VR headsets work with a wide range of Samsung devices.
Unity allows you extensive VR editing abilities and the option of adding GUI's and other features to the user experience. Once your Unity project has been properly exported with the Android Studio, you will be able to experience your unity project on any Samsung Gear VR device.
This tutorial assumes the reader has some experience with or interest in:
The rest of the tutorial is organized as follows:
This tutorial utilizes a Samsung Galaxy S6 and a Samsung Gear VR.
|PART NAME/DESCRIPTION||VENDOR||VENDOR Number or URL||PRICE||QTY|
|Samsung Galaxy S6||Amazon.com||https://www.amazon.com/Samsung-G928A-Unlocked-Quad-Core-Smartphone/dp/B01LWWCPZG/ref=lp_12522862011_1_1?s=wireless&ie=UTF8&qid=1483478412&sr=1-1||399.99||1|
|Samsung Gear VR||Amazon.com||https://www.amazon.com/Samsung-Gear-VR-Certified-Refurbished/dp/B01G5QBRLI/ref=sr_1_5?s=wireless&ie=UTF8&qid=1483478472&sr=1-5&keywords=gear+vr||59.93||1|
Before continuing, make sure you have the latest Android Development Kit (ADK) and Java Development Kit (JDK) installed on your computer. Make note of the directory for each.
First, enable USB debugging by navigating to Settings> About device> Build number and tapping build number 7 times. This will enable developer mode. Now go to Settings> Developer options, and check USB debugging to turn on.
Visit the Samsung website, or the appropriate OEM for your phone to download the latest USB drivers.
Once your phone's drivers are up to date, connect your phone with a usb cable and use the shell command
$ adb devices
This should return a string for all connected device numbers like so
List of devices attached xxxxxxxxxxxxxxxx device \\
Where xxxxxxxxxxxxxxxx is the device id for your phone. Copy this string and log in as a developer at the oculus site. Then go to https://dashboard.oculus.com/tools/osig-generator/
Enter your device id and save the signature file that is generated. We will need this to bypass security features when we run our new app on our phone.
Download and install Unity 5.1 or later. Upon opening your first project, you will need to perform several tasks to prepare your project for deployment to Gear VR.
First, go to Tools> Oculus Create store-compatible AndroidManifest.xml
Next, go to File> Build settings and change the platform to Android. Select ASTC for Texture Compression. At the bottom of this window, select Player Settings… and check Virtual Reality Supported.
Now go to the Project panel in the bottom left of the Unity GUI. Make a directory tree as follows Assets> Plugins> Android > assets. Now copy the signature file from the osig-generator into your assets folder at the end of the tree.
Now it's time to File> Build & run! The first time you build you will be prompted to enter the path to the ADK and JDK you downloaded at the beginning of the tutorial.
At the end of the build, you will receive an error about the launcher. This is fine, to test your app, touch the newly downloaded app on your phone and plug into the Samsung Gear VR headset.
Oculus has a great set of tutorials on building a VR minigame and lots of sample projects to explore. Next steps could include building a short Unity project and enjoying it on the Samsung Gear VR.