cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug report / Tip] Unity 5.5 freezing on start while VR support is not enabled. Caused by OVRHaptics

Theformand
Protege
Hello.

Some info:
Unity 5.5.0f3.
Newest Oculus SDK UnityPackage (I dont see a readme.txt with version number or anything), at the time of writing.
Newest OVRAvatar UnityPackage (same).

I have been trying to debug a strange issue that I encountered when trying to build a Non-VR mode for team mates with no headset.

If I disabled VR Support in player settings, or simply disconnected my Rift, Unity would freeze when hitting Play. No way out of it, other than to kill Unity and try again.

This appears to be caused by me initalizing OVRHapticsClips a few places in Start / Awake. If I stop doing this, Unity runs fine.
Repro steps are:

Step 1: Have a class with an OVRHapticsClip declared.
Step 2: Initialize the clip with the new OVRHapticsClip(AudioClip clip) overload.
Step 3: Go to player settings and disable VR support.
Step 4: Press Play.

For now, the best workaround I found is to check VRDevice.isPresent before init'ing any clips.

Happy dev'ing. Hope this helps the Oculus team as well.

1 REPLY 1

Theformand
Protege
Thanks for following up!