This guide covers everything you need to know to get started developing Unreal applications for Gear VR.
See Samsung Gear VR UE4 Quick Start step-by-step guide from Epic.
There are a number of ways that you can obtain the Oculus Unreal distributions:
To access these GitHub repositories, you must be subscribed to the private EpicGames/UnrealEngine repository (see UE4 of GitHub for details). If you are not subscribed and logged into your GitHub account, you will receive a 404 error. An Unreal license is not required.
There are two types of signatures that are required for your Gear VR application:
Note: An Oculus Signature File (OSIG) is not required for Oculus Go or Oculus Rift.
During development, your application must be signed with an Oculus-issued Oculus Signature File (OSIG). This signature comes in the form of a file that you include in your application in order to access protected low-level VR functionality on your mobile device. Each signature file is tied to a specific device, so you will need to generate OSIG files for each device that you use for development. When your application is submitted and approved, Oculus will modify the APK so that it can be used on all devices.
To add your OSIG to Unreal for development:
When you are ready to build an APK for submission to release, we recommend that you exclude the OSIG in your APK. To do so, select Edit > Project Settings > Android, scroll down to Advanced APKPackaging, and verify that Remove Oculus Signature Files from Distribution APK is checked.
Before building your final release, create a new Android keystore by following the “Manually Sign an APK” instructions in Android’s Sign your Applications guide. Once you have generated your distribution keystore, go to Edit > Project Settings > Platforms > Android, scroll down to Distribution Signing, and enter the required information.
See the Application Signing section of the Mobile SDK documentation for more information.
It is important to review Distribute, which covers Oculus Store submission requirements and guidelines.
In order to play an in-development application, you will need to enable the Oculus system to run applications from unknown sources by using the Oculus app settings, available through the gear icon in the upper-right. Select Settings, then select the General tab, and turn on Unknown Sources to allow this.
The first time you run an application that you have not downloaded from the Oculus Store, you will need to launch it directly. Once you have run an application from an unknown source at least once, it will then appear in the Library section of Home and the Oculus app, and may be launched normally, as long as Unknown Sources is enabled.
Your screen should look like this:
Press the Create Project button to create the project and load the UE4 Editor. A blank project appears in the editor:
Select Edit > Plugins, choose the Virtual Reality section, and make sure that the OculusVR Plugin is enabled.
Select Edit > Project Settings. Then, under Project, select the Maps & Modes section:
Under Default Maps, set both the Editor Startup Map and the Game Default Map to the level that you just saved:
Scroll down and select Engine > Input. Locate the Mobile section:
Set the Default Touch Interface to None:
The result should look like this:
Scroll down to the Platforms section, select Android, and on the right scroll down to the APK Packaging section, and click Configure Now:
Scroll down to the Advanced APK Packaging section, and enable the Configure the AndroidManifest for deployment to Gear VR check mark box:
Note: Since Oculus Go uses the same Android manifest settings as Gear VR, in Unreal 4.20 and later, this option has been renamed to reference Oculus Mobile (rather than Gear VR).
Click on the Android SDK section, and make sure that Android SDK tools that are needed to build your project point to the correct folder on your PC and set to the following API levels:
Scroll to the Engine section, select Rendering, and make sure Mobile HDR is turned off:
All Unreal apps that ship on the Oculus Store are required to implement the Entitlement Check to verify that the user’s app is legitimate. For information about how to implement the Entitlement Check, please see the Unreal Development Getting Started in the Platform SDK guide.
This section describes how to launch your UE4 project so that it can be viewed in the Gear VR headset.
adb devices. Note that depending on the device you are using, you may need to configure your connection for software installation. For more information, see Adb in our Mobile SDK Developer Guide.
In the UE4 Editor, click on the small white triangle next to the Launch icon to open the Options for Launching on a Device.