Forum Discussion
phileday
10 years agoMHCP Member
[VRDevice] Initialization of device oculus failed. Unity 5.3
I don't know if this is a bug report or something I should be approaching differently now I've updated to Unity 5.3
So my original scenario was to have the VR enabled and then when the game runs have the UnityEngine.VR.VRDevice.isPresent command detect whether the device was attached. If not I would turn off the vr UnityEngine.VR.VRSettings.enabled = false; and enable a non vr camera.
That all worked fine or as good as I would expect but now if you turn on your VR support and turn of the Oculus Rift and run your game it comes up with the error.
[VRDevice] Initialization of device oculus failed.
Should I be doing this differently now with the new version of Unity3D like having the VR tickbox off, check for ispresent first and then switch on vr if it is?
Basically is this a bug or a change to the way VR works with it's detection?
Any ideas?
Phil
So my original scenario was to have the VR enabled and then when the game runs have the UnityEngine.VR.VRDevice.isPresent command detect whether the device was attached. If not I would turn off the vr UnityEngine.VR.VRSettings.enabled = false; and enable a non vr camera.
That all worked fine or as good as I would expect but now if you turn on your VR support and turn of the Oculus Rift and run your game it comes up with the error.
[VRDevice] Initialization of device oculus failed.
Should I be doing this differently now with the new version of Unity3D like having the VR tickbox off, check for ispresent first and then switch on vr if it is?
Basically is this a bug or a change to the way VR works with it's detection?
Any ideas?
Phil
15 Replies
Replies have been turned off for this discussion
- dkdvHonored GuestSame situation here after upgrading to Unity 5.3
- vrdavebOculus StaffUnity 5.3 requires Oculus runtime 0.8 or higher. Are you using an older version? https://developer.oculus.com/downloads/ ... r_Windows/
- JohnDeHonored GuestI'm using the newest runtime 0.8 and I have the same problem. Is there any fix?
- philedayMHCP MemberI haven't found a fix but I have noticed that once the program is built it is working the way I expect it to. This isn't much of a solution for people without Oculus's though and I only know that it works the way I would expect once built for me and might not work for other people.
It would be good to know that it is know as a bug and will be fixed in the future. - vrdavebOculus StaffHere are some things to check:
1) Use the latest Oculus runtime (0.8). It sounds like you already are.
2) Use the latest NVIDIA or AMD graphics driver.
3) Make sure your hardware is VR-capable. It must meet or exceed our recommended spec at https://www.oculus.com/en-us/blog/powering-the-rift/. Optimus or Intel GPUs will not work.
4) Use D3D11. Using Unity with D3D9 or OpenGL on Windows will not work.
5) Remove any old VR integrations (such as our Unity 4 integration). If you have files like OculusPlugin.dll or OculusInitPlugin.dll in your project, Unity 5's built-in support may fail to initialize.
6) Unity may have serialized the wrong VR setting. You can test this by running Unity.exe with the argument "-vrmode oculus". If you have ever opened your project with an older version of Unity (especially Unity 5.0-5.1.1), metadata in your Library folder may be corrupt. Try forcing text serialization and then deleting your Library folder and re-importing all assets. - dshankarHonored GuestI've had a similar issue with Unity 5.3. Jonas at Unity recommended waiting for a couple frames for the Oculus driver to initialize.
Here's a temporary workaround that might help you?
public class Sample : MonoBehaviour {
IEnumerator Start() {
// Workaround: Give HMD time to initialize (2 frame skip)
yield return null;
yield return null;
// change VRSettings as needed
VR.VRSettings.enabled = false;
}
}
Jonas said this would be fixed in 5.2.3p3 (and I imagine in the next p-release of 5.3 as well?) - ederkleyHonored GuestI also had this issue but resolved now as I was starting Unity with "Run as Administrator" option.
My normal user account is non-admin.
(I think I was running Unity with "Run as Administrator" checked in the Compatibility mode to see if it would resolve another issue but then it started bringing up this Initialisation error for the Rift.)
Switching to my local admin account and running Unity from there worked normally with the Rift.
Switching back to my normal user account and running Unity without Administrator privileges also worked fine.
It's only when running from normal user account and starting Unity using "Run as Administrator" that seems to cause the Initialisation error.
(Win 10 64-bit, Oculus Runtime 0.8, Unity 5.3.0f4, GTX970 with latest Nvidia drivers) - sonkataHonored GuestSame problem here.
I am using Unity 5.3.1 + Oculus Utilities for Unity 5 V0.1.3.0-beta + GearVR Samsung S6.
Android SDK and Java jdk installed and their root folders properly specified in the unity settings.
No Oculus Runtime for Windows installed(is this not only for the oculus rift? Sorry for the nooby question)
Same log error: [VRDevice] Initialization of device oculus failed.
The app compiles and runs smooth on the S6. Can I ignore the error for now and continue developing waiting for the oculus and unity team to fix that, or should I be concerned with that log error popup?
Appreciated for any info - tmrhodes61Honored GuestI am having the same problem with an S6 and the gear vr. Any solutions?
- cyberealityGrand ChampionHave you installed the latest Oculus Runtime? It will be needed to test the game on the computer.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 years agoAnonymous
- 6 months ago