At Iris, we are always excited to try out new toys and share what we discover. With the release of Samsung’s GearVR at the height of the holiday season, Jack and Amr couldn’t think of a better time to dive into mobile VR.
GearVR is the result of a collaboration between Oculus and Samsung to produce an affordable, immersive mobile VR experience. We found that it absolutely lived up to that promise and serves as a great entry ticket for developers who are especially interested in wireless, portable VR.
We put together the steps below to walk you through the process of getting your computer set up and ready for VR development on your brand new GearVR. Enjoy!
GearVR: Samsung recently released an innovator edition. Order here
Samsung Galaxy Note 4: Unlike other HMDs, GearVR only works with the Samsung Galaxy Note 4. An international unlocked Galaxy Note 4 will not work, so we recommend buying it from any carrier here in the United States.
Bluetooth Controller: Unfortunately, GearVR is not shipping with a bluetooth controller which might be an essential component for some VR demos or games. Order here
A pair of headphones: Audio is an important component of immersion in virtual reality; we recommend getting a pair of headphones—preferably wireless or in-ear—to avoid cables and extra bulk on your head.
Now that we’ve covered the hardware specs of an ideal GearVR setup, let’s dive into the low-level details of getting your personal computer set up with Android development tools and the Unity engine.
Setting up the Android development tools
Install JDK 8
Click Install New Software in the Help menu of Eclipse
Add the https://dl-ssl.google.com/android/eclipse/ repository (This will add the Android SDK to Eclipse)
Check and Install Developer Tools
Point Eclipse to the Android SDK installation
Open Android SDK Manager
Install Platform Tools when prompted
Install additional packages from Android SDK Manager (in tools folder)
Install the API 19 SDK Platform and ARM System Image
Download and Run Android NDK (Note, it will extract the NDK in the same path you have downloaded the Android NDK)
Link the SDK and NDK to your system’s path:
Open a command prompt window and set PATH=%PATH%;C:\xampp\php, or
Add paths in the Environment Variables section of your Computer’s Advanced Properties
Download Apache Ant
Link Ant and the JDK to your system’s path
Verify integrity by echoing PATH and different home variables (ant -version)
It is worth mentioning that Android is moving away from Eclipse and into Android Studio but for now you will need Eclipse in order to develop for Gear VR.
Piece of cake, huh? Now, that you are set up as an Android developer, let’s move on to the fun stuff: setting up a project in Unity and deploying it to your GearVR.
Setting up a Unity project
Download and import mobile Unity integration package
Switch to the Android platform in Build Settings
Connect your Galaxy Note 4 to your computer and ensure Developer Mode is on
Set Texture Compression to ETC2 (GLES 3.0)
Set Default Orientation to Landscape Left in Player Settings
Use 16 bit depth buffer (OVRCameraController.cs)
Set the Mobile Splash Image to a solid black texture
Make sure Forward Rendering and Multithreaded Rendering are checked
Set Stripping Level to maximum applicable level
Make sure Optimize Mesh Data is checked
Make sure Anti Aliasing is set to Disabled
Set Pixel Light Count to be as small as possible
Set Fixed Timestep and Max Timestep to 0.016666 (60 FPS) in Time
Edit AndroidManifest.xml in Assets/Plugins/Android to ensure it has the following fields:
Currently the free version of Unity can’t deploy to GearVR, so you’ll need to purchase an Android Pro license which costs 1500$. However, much like with Oculus’s DK2 headset, the option to develop with Unity Free shouldn’t be far away. (Corrected: So the combination of Unity and Android is the bug, we have Unity Pro which will not work with Android free but Unity's free version can deploy to GearVR)