Yes GearVR is supported using VRDeviceType.oculus. When running in the Editor you need to have a rift attached as both GearVR and Oculus use the same plugin, but the editor is set to display on the rift.
The two errors that you are seeing are due to an object in the scene that is still trying to access the legacy OVRManager and CameraRig. Your scene should not contain any legacy objects or prefabs otherwise you will receive errors.
Ed unity - I had the same problem as phil_lira and deleted the exact same folders as him. To get a good baseline test on my Gear VR, I started a new project.
I’m seeing the same errors about OVRCameraRig, etc. as phil_lira on a BLANK project with no scripts, 2 cubes and a D-Light! “VR Supported” is checked. My tiny little test app crashes back to the Samsung VR Dashboard (which was built with 4.6.3p2, hence that entry after my app crashes) the moment I don the Gear VR (or stick my finger by the sensor to fool it!).
What’s going on, here?
Here’s my logcat file which I made sure to clear right before I ran my test app:
@snowsrfr1 Could you submit a bug report with your project and post the bug report number? I’ve not been able to reproduce the error using a new project and enabling Virtual Reality Supported and deploying an Android Player. It works properly on the GearVR. A bug report that I can reproduce with would definitely help.
@adamhill At the moment yes you need to have a rift in order to run in the Editor. We are working on finding a solution for this problem. For now, if you don’t have a rift you will need to go through the nasty process of deploying to android for each run. We understand this is a huge problem and apologize that we don’t already have a solution in place. Having the option to deploy now makes a smooth workflow for creating a single app for GearVR and Rift. Otherwise they would need to switch between the Legacy Plugin and Native Integration.
We still need an oculussig file in /Assets/Plugins/Android/assets, correct?
I will .zip up my project after doing a little more hunting into my dev environment and get back to you today. I do also have 5.0.1p2 installed on the same machine in a different directory for another project.
I’ve filed case 705638 in the bug reporter, with my project, editor files, and logcat output attached.
Hopefully I’m just doing something wrong which is trivial and/or stupid.
I’ve just download and tested your project with a fresh install of 5.1.0p1 and I was able to run in the Editor without making any changes to your project and I was also able to build and deploy to GearVR with only adding my Note4’s signature file to the Assets/Plugins/Android/assets folder. I’m not sure how you are receiving this error in the project that you sent. Could you try either re-installing 5.1.0p1 or installing the official 5.1.1f1 (released yesterday). See if that resolves the crash.
Same results with my old project.
Same results with a new project.
Same results on a colleague’s Note 4.
I have Unity 5.1.1f1 installed in \Program Files\Unity 5.1 and Unity 5.0.1p2 installed in \Program Files\Unity
One of the old workarounds in 5.0.x was to copy OculusPlugin.dll into the Unity/Editor folder (which worked for me some time ago)… Perhaps my 5.1.1f1 installation is pulling OculusPlugin.dll from my 5.0.1p2 installation folder?
EDIT: Nope… tried that, too
I’m going to keep looking into this and post results. @phil_lira - where are you with this issue? You are the OP
@snowsrfr1 In the new project, try removing the Legacy Plugin from the plugins folder if it is there. I don’t remember if it was in the project you sent, but just in case.
I promise you it was not. The project didn’t contain anything but a .unity scene containing two cubes and a d-light, along with my osig file. It’s gotta be some kind of machine / environment thing, but it sure is driving me up a wall!
I’m seeing the same here. Basically empty project with a scene with some cubes and a camera, building and getting an <App_Name> has closed unexpectedly message when launching.
I’m also seeing the below in logcat.
Can't add component because class 'OVRManager' doesn't exist!
E/Unity (19496):
E/Unity (19496): (Filename: Line: 691)
E/Unity (19496):
E/Unity (19496): Can't add component because class 'OVRCameraRig' doesn't exist!
E/Unity (19496):
E/Unity (19496): (Filename: Line: 691)
E/Unity (19496):
Dumb question: I’m running Unity on a mac, is building to gear vr only supported on windows?
On Mac also - I have yet to get Unity 5.1p1 and oculus 0.6.0.1 to work with the VR Player set to on.
It always crashes on start.
With this same setup and the Oculus package it compiled but produces images only in the left eye. Right eye is black.
Flagged by Oculus today that the actual Mac Android SDK was broken and should be updated. I can now build the Native code samples. Have not had time to try Unity builds with it but it’s possible part of same issue?
@snowsrfr1 Could you send me a full logcat of the app running on the device?
Do the following steps:
Go to your Android sdk install/platform-tools folder in the command window.
Make sure your app isn’t running on the device and the device is connected to the computer.
In the command window run:
adb tcpip 5555
Disconnect the device from the computer.
In the command window run:
adb connect device’sIPaddress:5555
adb logcat -c
adb logcat -vtime > GearVRCrash.log
Run the app on your device.
After it crashes press Ctrl+C in the command window.
You will then have a full log called GearVRCrash.log in your platform-tools folder. Send that to us either on this forum or through the bug report you created.
log file attached and zipped. I tired to minimize the time between clearing the log file and attaching the Note 4 into the Gear VR, but as you know, there’s a LOT of stuff being written to the log at any given time.
Looks like there’s an exception that gets thrown when getApplicationName gets called. Things so south fairly quicky from there but you will see the errors about the legacy OVR components, followed by a segfault in UnityMain.
Using Samsung Galaxy 6 Edge, and the Unity 5.1.1F1 release.
I created a scene with a cube/sphere/directional light. I put my signature file in /assets/. I enabled VR and multithreaded rendering and clicked build.
I get a spinning wheel for a moment then it crashes to the Gear VR room.
I found this in the logcat,
E/Unity (20420): Unable to find OculusInitPlugin
Do you want me to send in my project/log file as well?
Edit: Oculus version 6.0.0 installed on PC
i’m building from Windows 7
I am able to run using Oculus SDK v0.6 with Unity 5.0.1p2. If you folks need an immediate plan B, I can verify that this combination of the editor / SDK can work.
@snowsrfr1 I’m sorry for being away. I was out of office due to a health issue a while after I posted this and just got back today. I still can’t build for GearVR on NativeVR.
@Ed_unity I checked my Editor Build Log and there’s no mention of OVRPlugin.dll on it. Shouldn’t it be loaded as a native extension module? As a matter of fact, there’s no mention to anything VR at all. which is rather strange.
Can you confirm you are building this with a Rift disconnected from your PC? Peharps Unity might check for that and include the right dependencies when Rift is connect.
I attached my Editor log in case it helps track the error.
Thanks for the logs, we now know what the issue is and we are working on a fix that we hope to be available in 5.1.1p2. This issue is with Android Personal license. So if you have Android Personal, you should just need to include the Oculus Plugin, the OVRCameraRig and OVRManager scripts in your application in order to workaround the issue and still use the Native Unity Integration. Otherwise, only use the Oculus Plugin. I’m confirming this workaround works as well and will keep you guys updated.