Download

Gear VR support?

I’ve been using the straight-to-device launcher option but that doesn’t help with the plugin issue. My guess is that somehow the GearVR plugin is not being included in the Android build. It never makes it to the device. I don’t understand the build system well enough to say for sure.

Did you generate the appropriate signature file for your device?

From the SDK doc “Device and Environment Setup”:

I do have a signature generated, but I’m not sure what to do with it. The Oculus docs only cover Unity and native. Will see if I can inject it manually into the apk or something…

Ran into a couple of issues with 4.7 preview 2. First, when I try to build the sun temple template project as a test for GearVR, I choose android ETC2 and a window immediately pops up that says “Android Development Setup, You are missing some required components for Android game creation. Even if you have installed the Android SDK already, there may be some missing components or environment variable” It redirects to https://docs.unrealengine.com/latest/INT/Platforms/Android/GettingStarted/index.html which are the exact directions I have followed.

I have all android SDK prerequisites loaded properly and am able to build Unity GearVR demos without issue, so not sure why I’m still receiving this message. I loaded every checkbox from the android SDK manager just to be sure.

Also, when I try to import the oculussig_ file into the project it informs me that it is an unknown extension. So even if I could get an APK to build I doubt it would launch without that file. Has anyone had any luck with this?


Edit:*** I have tried going to edit > project settings > Platforms (on the left) > android, and configuring the project for android. I clicked open manifest and placed the Oculus signature file in a “assets” folder I created there. But I am still getting the popup window when trying to build an android ETC2 project that mentions “You are missing some required components”

Edit2: Ok so I edited the AndroidManifest.xml under project settings, Andoid, “open manifest folder”. Added the line <meta-data android:name=“com.samsung.android.vr.application.mode” android:value=“vr_only”/> above the tag </application> in that XML file. I placed the oculus sig file in a folder called “assets” there. I also check boxed “Package .pak in APK” under project settings, packaging which got rid of the “You are missing some required components” error window. I was able to create an APK and launch it on the GearVR, but it would immediately go to a black screen then the Oculus Store homepage. If I set the screen orientation to Sensor Landscape before packaging I can see the content in the GearVR, but it is not in VR mode… just 2D mode. Any ideas?

Where did you get the info to try this?

I’m guessing from this parallel thread on the Oculus forums: https://forums.oculus.com/viewtopic.php?f=62&t=19148

Yup. So I didn’t realize there was a GearVR plugin I also had to activate (I grabbed it from Github) Now when I execute an app I get the black screen of death dvddoe was talking about.

^^^ This! I would also like to know if any Google cardboard support will be coming for those of us who haven’t pulled the trigger as of yet on GearVR

Second that! Many early adapters of VR will go for Cardboard.

I consider myself an early VR adopter. I have Google Cardboard, DK1, DK2, and now GearVR. As you probably know GearVR is on a completely different level than Cardboard. Google Cardboard is actually pretty terrible as it stands right now. The latency is aweful, and I personally could care less if Epic added support for it really.

It’s okay for getting a really rough idea of what VR is like if you are on a tight budget. But still pretty terrible nonetheless. Until google makes some big changes on the software side (and I don’t think that would even be enough, probably need additional IMUs I imagine) I won’t be supporting it personally, do not care if there are more potential sales for myself (because more users would have access to it). I won’t support something I don’t think is up to par. The only thing I care about is VR actually succeeding this time around, even more than myself making a few bucks riding the VR hype train. I will not play any part in potentially poisoning the VR well as I believe products like cardboard do. Hope this doesn’t come off as too harsh, I just dislike cardboard.

has anyone had any luck launching Samsung note 4 successfully using preview 3 yet?

Yeah, I agree, Cardboard experience cannot compete with GearVR now, but I think hardware developers will develop DIY Cardboard with dedicated IMU in it to enhance the overall experience.
As content provider, I simply see potential in it. But who knows, it may turn out to be good or bad in this coming year. I just hope when it turns out good, my content can be ported to it without too much trouble.

It doesn’t look like theres been much success in getting a build on the gear so that makes me feel a little better :slight_smile: I did note that some of you are putting the “VR_only” line inside the androidmanifest.xml file of the project folder, I’ve been talking to to a dev from unreal and he told me to put that line inside the androidmanifest file of the engine/build/android/java.

Does anybody know if we are supposed to save the file on the sd card? When I launch the project it builds and creates the executable on my phone and when I touch it it tells me to connect gear to my device when I do the screen goes black and just takes me to oculus home. I was thinking maybe i just need to put the .exe into the folder with all the other games similiarly to how you put video on the gear but I couldn’t find where the game executables are stored.

where exactly do you put the VR_only inside the andriodmanifest.xml? what is the syntax?

Hi All, I’m Trying to get the GearVR plugin to work in Unreal and build out to the phone.

I’ve tried to work out from all of the above posts what i’m “step” i’m missing to get past the ~“GearVR” module is missing~ message that pops up on the phone. I’m just installing Visual Studio to see if you have to run projects in C++ mode and not as a blueprint, but other than that i’m stumped and its probably really obvious.

Unreal 4.7.0 preview 4
New project empty blue print
GearVR plugin enabled and restarted

Project-Settings-Packaging: “Package .pak in APK” selected
Platforms-Android: Platform files are Writable in green

Edited AndroidManifest.xml in Project-folder/Build/Android
Added line <meta-data android:name=“com.samsung.android.vr.application.mode” android:value=“vr_only”/> after <application>
Have also tried just before </application> tag.

Also added Camera Permission, out of desperation.
<uses-permission android:name=“android.permission.CAMERA” />

Samsung SM-G900X
Android 4.4.2

Tried both File>Package Project>Android>Android(All) and File>Package Project>Android>Android(DXT)

I have the oculus SDk downloaded, but not sure if i have to do anything else with it.

Any advice appreciated.

Edit/Update: Tried the following, it didn’t work for me.

Here are MarcelBlanck’s instructions:

…It might be possible on preview, but I did it on the master branch. It should be possibe on promoted also, master was only a few commits ahead.

1. Make sure all Verions SDK, ANT, NDK are standard for UE4 and on PATH. So just let the the UnrealEngine/Engine/Extras/Android/tadp-2.0r8-windows.exe do it's job
2. Checkout the master or promoted branch
3. Open Visualstudio and build the whole Project with x64 | Development Editor
4. After that build one mor time but only UE4 by rightclicking on it and with target Android | Development
5. In the explorer go to UnrealEngine\Engine\Source\ThirdParty\Oculus\LibOVRMobile\LibOVRMobile_041
6. Execute the InstallVRLib.bat
7. Open your Project with the build Engine Editor and make sure it has the Project Settings &gt; Target Hardware to mobile and scalable, under Input select Default Touch Interface and clear it (we do not want that sticks)
8. Enable the GearVR plugin!
9. In UE4 Editor, I have set the Project Settings&gt; Andoid SDK paths correctly to the one you build the engine with
10. Go to Project Settings &gt; Android &gt; APK Packaging and set Minimum SDK version to 19
11. Go to Project Settings &gt; Android &gt; Advanced APK Packaging and add &lt;meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" /&gt; (To bad they automated the Manifest production)
12. In the same category, a few lines below, add android.permission.CAMERA to the Extra Permissions
13. Check the rest of the settings is default, ES2 and arm 7 build selected
14. IMPORTANT - got to your Projects folder MyProject/Build/Android and create a folder named "assets" - put your downloaded generated Oculus signature file in that folder
15. Go to File &gt; PAckage Project &gt; Android &gt; Android ETC2

DONE!

I still had a crash with the FPS Template, the android debug log said the Crosshair Texture was null… wtf. I deleted it in the project and I was able to run it, and look around with my GearVR! So make sure you check your adb logcat output and find the exact reason for a the problem if you get a black screen - Mostly it will be near words like Exception ot WINDEATH

    If you want full Samsung controller support apply the patch in the original post here. I will now start to check what kind of events the build-in touchpad and Backkey throw. I also need to know how to access the GearVR Main Menu and how to go to Oculus Home. So still some work to do. Then the development fun can begin.

New update in the Master branch to the 0.4.2 Mobile SDK which probably means it has some other fixes as well. Anyone care to give it another go?

Alright. For anyone who wants to grab the latest from the GitHub 4.7 branch, these instructions should get you started.

Prerequisites:

  • Have a Note 4 and GearVR kit, and already be set up with the ability to build and deploy Android UE4 projects to your device
  • Grab 4.7 from GitHub and run the Setup.bat in order to get the latest binaries. Please make sure to re-run Setup.bat if you have already run it, because there are new libraries for GearVR support
  • Get an osig file for your device from Oculus Developer Dashboard
  • Create an ‘assets’ directory within Engine/Build/Android/Java, and place your osig file in this assets directory. Your project will not run on device without this osig present in this directory at packaging time

Build and Run the editor:

  • Run GenerateProjectFiles.bat to update your solution
  • Open ue4.sln in visual studio, and build and run the UE4 project in ‘Development Editor - Win64’ configuration

Create your project:

  • Select the ‘New Project’ tab
  • Select the ‘C++’ tab (currently GearVR support requires a C++ project since plugins are not built into the default executables)
  • Select the ‘First Person’ template
  • Change the options to ‘Mobile / Tablet’, ‘Scalable 2D / 3D’, ‘No Starter Content’
  • Name your project something like ‘MyGearVR’
  • When visual studio opens up again, compile and run the MyGearVR project

Configure and package your project for GearVR:

  • Go to the ‘Windows/Plugins’ menu item, and go to the Head Mounted Displays page - disable Oculus (optional) and enable GearVR, click ‘Restart Now’
  • Select the ‘Edit/Project Settings…’ menu item
  • In the Android section, scroll to the top and click the ‘Configure Now’ button for Android support
    Set the Minimum SDK version to 19 or higher
    Select the ‘Configure the AndroidManifest for deployment to GearVR’ checkbox
  • In the Packaging section, optionally click the advanced down arrow in Project and disable ‘Full Rebuild’ in order to speed iteration times
  • Select the ‘File/Package Project/Android/Android (ETC2)’ menu item and package your project to a directory of your choosing

Install and Run:

  • Connect your device and have it able to accept adb sessions. Please see the normal UE4 Android documentation for details if you’re not familiar with this process
  • Run the installation script from within the directory you packaged to
  • On device, find your application icon, click it, and then attach the GearVR headset to the phone

I think this may have been where I was messing up this entire time, and Java folder for signature file.

Any ideas on when blueprint-based projects will get support? I am getting pretty ok with the blueprints but not very good with the C++ based projects yet. Thank you for the instructions btw.

C++ Mmmmm… I am all blueprint but I saw this :

"How to Convert a BP/Content Project to a C++ Project in 8 Steps"](A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums)

I have to try it as my GearVR project is done, so I’ll report back here.