Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
10 years ago
Solved

[VRDevice] Initialization of device oculus failed.

Hello..

I just started into VR. I am developing for gear VR. I am using Unity 5.3.4p6. I have imported ovr_unity_utilities_1.3.2 from oculus downloads. I have replaced oculus data files from OVRPlugin_Unity5_1.3.2 as suggested into unity installed folder. then I also enable VR from player settings. when I press play button I get this error.[VRDevice] Initialization of device oculus failed. I have tried also other Unity versions like 5.3.4f1. but same error occurs.

Any help is appreciated.
  • 1) You no longer have to replace the plugin dlls in the Unity folder when using Unity 5.3.4p5 and up.

    2) You will get that error if you do not have a Rift attached to your computer, even when targeting GearVR. The Unity Editor attempts to render your game on a connected Rift when you have VR mode enabled in the player settings. You can safely ignore this error when testing in the editor.

    However, if you were relying on the OVRCameraRig for looking around your environment, you will need to add a regular camera with some other view controller mechanism, since the OVRCameraRig will not work properly. I solve this problem through an AppInitialization script that has a "InitVRSettings" function. In this function, I check if a VR device is present using 







    VRDevice.isPresent. If not, I add a MouseLook controller to the "MainCamera" in the scene so that I can still look around the environment.

3 Replies

Replies have been turned off for this discussion
  • 1) You no longer have to replace the plugin dlls in the Unity folder when using Unity 5.3.4p5 and up.

    2) You will get that error if you do not have a Rift attached to your computer, even when targeting GearVR. The Unity Editor attempts to render your game on a connected Rift when you have VR mode enabled in the player settings. You can safely ignore this error when testing in the editor.

    However, if you were relying on the OVRCameraRig for looking around your environment, you will need to add a regular camera with some other view controller mechanism, since the OVRCameraRig will not work properly. I solve this problem through an AppInitialization script that has a "InitVRSettings" function. In this function, I check if a VR device is present using 







    VRDevice.isPresent. If not, I add a MouseLook controller to the "MainCamera" in the scene so that I can still look around the environment.
  • Close Unity
    Go into the Beta menu and Restart the Runtime.
    Check that Home is working
    Restart Unity
  • Anonymous's avatar
    Anonymous


    1) You no longer have to replace the plugin dlls in the Unity folder when using Unity 5.3.4p5 and up.

    2) You will get that error if you do not have a Rift attached to your computer, even when targeting GearVR. The Unity Editor attempts to render your game on a connected Rift when you have VR mode enabled in the player settings. You can safely ignore this error when testing in the editor.

    However, if you were relying on the OVRCameraRig for looking around your environment, you will need to add a regular camera with some other view controller mechanism, since the OVRCameraRig will not work properly. I solve this problem through an AppInitialization script that has a "InitVRSettings" function. In this function, I check if a VR device is present using 







    VRDevice.isPresent. If not, I add a MouseLook controller to the "MainCamera" in the scene so that I can still look around the environment.


    Thank you so much for your answer. I actually wasted 3-4 days due to this error trying to install unity and oculus different version in different systems. Now I can use this AppInitialization script for development.