cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Reality SDK Oculus failed to initialize

markLaurel
Level 3
Hello everyone,

I'm trying to do my first VR project using Unity developing with GearVR. The problem is, I keep getting the alert "Virtual Reality SDK Oculus failed to initialize".

I've got the Oculus SDK installed, as well as the OSIG in my asset folder.

What other steps am I missing?

12 REPLIES 12

Halfspacer
Level 5
You're getting this error when you "build & run" to the phone? Does it end up just displaying one eye? Does it refuse to run all together?

markLaurel
Level 3
Refuses to run in play test.

Halfspacer
Level 5
In the Unity Editor or in the GearVR? The Unity Editor will naturally throw a "Virtual Reality SDK Oculus failed to initialize" unless you have a PC-VR headset connected to your PC. You need to build and run your project over to your phone.
The "Failed to initialize" errors don't usually result in a refusal to run though. It should just default to standard monoscopic rendering - So I'm questioning whether I'v really understood what you meant. 

markLaurel
Level 3
Yes @Tolin93 , you understood perfectly- thank you. I'll try the build & run to see if I can get the project on the phone.

Halfspacer
Level 5
It still shouldn't refuse to run in the Editor though. When you hit play, aside from the (yellow) warning in the console, do you get any (red) errors?

markLaurel
Level 3
no crit errors, just alerts

Halfspacer
Level 5
Then just ignore it 🙂 It's just a Unity warning letting you know it's not finding a connected VR headset. When you deploy and run on the phone the Oculus SDK will run as it should as well.

markLaurel
Level 3
Interestingly, I'm able to build regular android APKs.

But when I try to build for gearVR I get the following.

qut71ceoshso.png

This is my project setting
ucv1jemqsik6.png

Halfspacer
Level 5
Under "Player Settings", try setting your Target API to Level 23. That should fix it. 
It sounds like you might have an older version of the Android Build Tools installed.