Unreal Engine 4 and Samsung Gear VR
September 5, 2016 • UnrealEngine4 VR Android • 4 minutes to read • Edit
A simple game using Unreal Engine 4.10.* and 4.11.2 for GearVR
The code can be found at - https://github.com/akshaybabloo/GearVR-UnrealEngine4
Note 1: For Mac users make sure you download Java 6 -> https://support.apple.com/kb/dl1572 and Java 7. The setup is the same for UnrealEngine 4.11.
Table of content
- 1 Introduction
- 2 Requirements
- 3 Instillation
- 4 Developing a game
- 5 Packing it up for Android
- 6 Installing it on Android
License
The code is provided under MIT License, and the tutorial is provided under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
1 Introduction
In this tutorial, I will be going to develop a simple environment where the first person player can walk around. This game was developed on Mac and should be similar to windows. Please see “Note” where I would be including some important points about the structure and running of the game.
2 Requirements
2.1 General
- A 2015 Samsung Galaxy phone i.e. S6, S6 edge, S6 edge+ or Note 5.
- Samsung Gear VR.
- Experience with Unreal Engine 4. If you don’t have any previous experience, you can go through my tutorial on Unreal Engine 4 here
2.2 Mac
Software
- Unreal Engine 4
- Android Studio
- AndroidWorks
Hardware
- A 2015 Samsung Galaxy phone i.e. S6, S6 edge, S6 edge+ or Note 5.
- Samsung Gear VR.
2.3 Windows
Software
- Unreal Engine 4
- Android Studio
- AndroidWorks
- Samsung drivers
Hardware
- A 2015 Samsung Galaxy phone i.e. S6, S6 edge, S6 edge+, S7, S7 edge or Note 5.
- Samsung Gear VR.
3 Instillation
3.1 Mac
3.1.1 Android Studio
- Download Android Studio.
- Open it and move it to
Application
. - Open the application and follow the installation process.
- Once the installation process is done, open the application and do the follow
- Click on
Android Studio -> Preference
- Click on
Appreance & Behavior -> System Settings -> Android SDK
and tick onAndroid 5.0.1
andAndroid 5.1.1
.
Installing command line tools
- Open
Terminal
. - Type
nano .bash_profile
and type the following in it:
# Android
export PATH="/Users/<user>/Library/Android/sdk/platform-tools:$PATH"
export PATH="/Users/<user>/Library/Android/sdk/tools:$PATH"
Note 2:
<user>
should be replaced by your username.
- To save press
Control + x
and then pressy
. - Restart
Terminal
and typeandroid
to see if the tools are working.
3.2 Enabling Android Developer Options
- Go to
Settings -> About -> Software Info
and click onBuild Number
seven times. - Now go back, You should now see
Developer Options
.
- Click on
Developer Options
and enable `USB debugging.'
- Once you connect your phone to the system, it will ask you to confirm the connected computers RSA KEY. Click
Ok
to continue.
3.3 Getting device ID
Make sure you have your phone connected to the computer, and the USB debugging
is switched on. Open Terminal
and type in adb devices
, this will print an alphanumeric/numeric key something like this.
List of devices attached
1234567891011123 device
3.4 Downloading Oculus Signature File (osig)
and placing it in UE
Copy the above number and go to https://developer.oculus.com/osig/ and paste it in the text field then click on Download File
. oculussig_1234567891011123
file will be downloaded.
Move this file to /Users/Shared/UnrealEngine/4.10/Engine/Build/Android/Java/assets/
Note for UnrealEngine 4.11: If you can find
assets
folder, create one and move the file to it.
3.4 Installing CodeWorks for Android
Goto /Users/Shared/UnrealEngine/4.10/Engine/Extras/AndroidWorks/Mac/
. Open AndroidWorks-1R1-osx.dmg
and follow the instillation steps.
This is what I have installed:
The following components are installed:
Android SDK
+Android SDK Base 24.2.0
+Android Platform Tools 22.0.0
+Android Build Tools 22.0.1
+Android 4.4.2(API 19) 4.4.2
+Android 5.0 (API 21) 5.0.1
+Android SDK Support Library 22.2.0
+Android SDK Support Repository Library 15
Android Toolchain
+Android NDK 10e
+Apache Ant 1.8.2
+Gradle 2.2.1
4 Developing a game
Please see my tutorial on UnrealEngine 4.
5 Packing it up for Android
5.1 Package Configuration
Once you have completed designing the game do the following:
Open Plugins
Then, make sure you have enabled the following:
Next open your Project Settings...
, Go to Target Hardware
and do the following:
Then do this:
Then do the following:
Then do this:
And then this:
5.2 Packing
Do the following:
6 Installing it on Android
Note 3: Make sure you have connected your phone before proceeding.
Open Android_ETC2
folder and double click on Install_GearVR-UnrealEngine4_Development-armv7-es2.command
, this will open Terminal
and install the software for you.