User Tools

Site Tools


exporting_unity_projects_to_samsung_gear_vr

This is an old revision of the document!


Exporting Unity Projects to Samsung Gear VR

Author: Blake Hament Email: [email protected]
Date: 12/30/16
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.

Motivation and Audience

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:

  • VR
  • C# or other programming languages
  • Unity
  • Oculus

The rest of the tutorial is organized as follows:

  1. Bill of Materials
  2. Software
  3. Final Words

Bill of Materials

This tutorial utilizes a Samsung Galaxy S6 and a Samsung Gear VR.


Software

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.

Preparing your phone

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.

Installing and Configuring Unity

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.

Final Words

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.

exporting_unity_projects_to_samsung_gear_vr.1483576084.txt.gz · Last modified: 2017/01/04 16:28 by blakehament