In my project, usually after I’ve been working for a bit, every time I enter play mode, the console floods with exceptions about not supporting haptics or something. The project was modified from the VR sample project so my XRI Default Input Actions.asset file originally came from that.
Up until this starts happening, everything works fine (haptic pulses included), but once this starts, the haptics seem to stop working. Once I restart the editor, everything is once again back to normal.
I just updated to the latest version of the Input System package (1.11.2) hoping that it would resolve this for me, but it continues.
It’s pretty annoying though. Sometimes I’ll go hours without it happening and other times, it happens faster. Any ideas what could cause a bug like this or a solution?
It’s always about the Haptic Device. I never wrote any code dealing with that particular Input Action Reference. I’m just using the unmodified Haptic Impulse Player script that came with the VR sample project.
It seems like there could be a memory leak bug in the Unity Editor that is causing an excessive number of controls to be resolved to the Haptic Device action in the XRI Default Input Actions asset. If you are using OpenXR, you can replace the Any binding (*) in those actions in the XRI Left and XRI Right action maps with <XRController>{LeftHand}/{Haptic} and <XRController>{RightHand}/{Haptic} which should resolve the issue.
The {Haptic} control will only work on OpenXR, so it won’t work for you if you are using the Oculus plug-in provider unfortunately.
You can report a bug and tag the Input System (com.unity.inputsystem) package, and I’ll also bring it up with that team.
As a workaround until the bug is fixed, you can replace the binding with <XRController>{LeftHand}/{DevicePosition} and <XRController>{RightHand}/{DevicePosition} since those should both resolve to some control on the device. The value of the control isn’t actually used in the code, it just identifies the active XR Controller device for the haptics component to send the impulse event to.