Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Getting a crash with OVRHapticsClip in Unity

Matt2010Matt2010 Posts: 12
Hey everybody!
Not sure what I'm doing wrong, unless it doesn't like the clips I've tried, but I get a crash every time I try to run my game with the line:

myHapticsClip = new OVRHapticsClip(hapClip, 0);

I have tried a few clips now but it just goes non responsive when I hit play. Any ideas, or anyone see this before?
Thanks in advance, Matt K


  • Matt2010Matt2010 Posts: 12
    Thanks imperativity, It's a very annoying thing to be stuck on, and it just wont go.
  • kerskkersk Posts: 82 Oculus Staff
    Hi Matt,

    Unfortunately, we are unable to reproduce the issue you are seeing.

    Can you attach your unity logs after encountering this error? Also, what version of Unity and Oculus Utilities are you are using? If possible, a minimal project that includes the sample data and demonstrates the crash would be extremely helpful as well.


  • kerskkersk Posts: 82 Oculus Staff
    Is it possible the byte[] you are passing in as "hapClip" is null? That would cause a null reference exception and could potentially explain the behavior you are seeing.
  • WelbyWelby Posts: 1,065 Oculus Start Member
    Just posting this here since it may help. I got a crash with this code "myHapticsClip = new OVRHapticsClip" as well on Unity 5.4 beta. However the crash disappear and everything is fine on Unity 5.6 beta.

    I'd suggest you to update your Unity version since that may be he issue.

    Hope that helps
Sign In or Register to comment.