Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SteamVR haptics failing in Unity 2022.3.+ #1096

Open
Giantbean opened this issue Jun 30, 2023 · 7 comments
Open

SteamVR haptics failing in Unity 2022.3.+ #1096

Giantbean opened this issue Jun 30, 2023 · 7 comments

Comments

@Giantbean
Copy link

I have been trying to get Steam VR to work with open XR for far too long I have Hurricane VR with Steam VR implementation on an XR rig and it was working in an older unity build however I recently updated a project to Unity 2022.3.1 LTS but ever since I have had terrible frame rates and I am getting an error that I have no idea how to fix.

[SteamVR] TriggerHapticVibrationAction (/actions/HVR/out/Haptics) error: NoData handle: 1152950504226030324
UnityEngine.Debug:LogError (object)
Valve.VR.SteamVR_Action_Vibration_Source:Execute (single,single,single,single) (at Assets/SteamVR/Input/SteamVR_Action_Vibration.cs:207)
Valve.VR.SteamVR_Action_Vibration:Execute (single,single,single,single,Valve.VR.SteamVR_Input_Sources) (at Assets/SteamVR/Input/SteamVR_Action_Vibration.cs:49)
HurricaneVR.Framework.SteamVR.HVRSteamVRController:Vibrate (single,single,single) (at Assets/HurricaneVR/Framework/Scripts/SteamVR/HVRSteamVRController.cs:146)
HurricaneVR.Framework.Components.HVRHandImpactHaptics:Vibrate (single,single,single) (at Assets/HurricaneVR/Framework/Scripts/Components/HVRHandImpactHaptics.cs:45)
HurricaneVR.Framework.Components.HVRImpactHapticsBase:OnCollisionEnter (UnityEngine.Collision) (at Assets/HurricaneVR/Framework/Scripts/Components/HVRImpactHapticsBase.cs:57)
UnityEngine.Physics:OnSceneContact (UnityEngine.PhysicsScene,intptr,int)

With a matching error (likely for the other hands haptics)
[SteamVR] TriggerHapticVibrationAction (/actions/HVR/out/RightHaptics) error: NoData handle: 1152950504226030325
UnityEngine.Debug:LogError (object)

I have tried updating to the newer 2022 LTS but have had many issues.

Please advise.
Thank you.

@Giantbean Giantbean changed the title SteamVR OpenXR haptics failing in Unity 2022.3.+ SteamVR haptics failing in Unity 2022.3.+ Jul 4, 2023
@Giantbean
Copy link
Author

Giantbean commented Jul 4, 2023

I am using a character rig that has worked prior to the new Unity versions so the action inputs should all be the same.
Also the HTTP in some code needs to update to HTTPS in the repo for ease of use.
image
image

@zite
Copy link
Collaborator

zite commented Jul 5, 2023

Heya, not sure why this isn't working. Can you provide a full unity log?

@Giantbean
Copy link
Author

Editor.log
Thanks. Hope the log helps.

@zite
Copy link
Collaborator

zite commented Jul 5, 2023

Unfortunately I'm not seeing anything super obvious in the logs. It looks like its failing during initialization, which is pretty odd. I've got a few suggestions but its hard to guess what's wrong with an existing project. If you can give repro steps I could debug further. As to my guesses though:
Maybe disable the OpenXR loader? If that tries to initialize first that could break things.
Are you running a super old version of SteamVR itself?
Also try saving and regenerating actions in the SteamVR Input window.

@Giantbean
Copy link
Author

I'm using SteamVR 1.16.8; the current OpenXR runtime is SteamVR. Unity Project Settings are set to OpenXR Play mode runtime SteamVR and I have tried using just OpenVR. Things work in Unity 2020 and 2021 versions so I think this is a Unity 2022 issue. I have made 8 test projects and updated three projects from 2021 to 2022 and all of them have issues. I have uninstalled all Unity versions and Hub and reinstalled just LTS versions and every time I get errors, crashes, and terrible frame rates. Projects that were getting steady 90+ fps drop to 30- as soon as I bring them into 2022 Even Unity's own XR framework example bounces between just 40 and 70 fps.

@zite
Copy link
Collaborator

zite commented Jul 6, 2023

The SteamVR Unity Plugin will not function if you try to use OpenXR. It is made exclusively to work with OpenVR. I'd recommend removing the OpenXR package and then we can take a look at the editor log again.

@Giantbean
Copy link
Author

Giantbean commented Jul 6, 2023

Will do.
I have an older project with both in it and it works fine

image

but if I have to choose one or the other I will use SteamVR so long as I can get it working in Unity 2022.

It seems one trick to making it work with both is to not fix the input system

image

At least in older versions of Unity. So the OpenXR is likely redundant and doing nothing but adding the project's file size. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants