ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.04k stars 259 forks source link

New Unity Input System is not compatible with SteamVR Unity Plugin #768

Closed flipwon closed 4 years ago

flipwon commented 4 years ago

Just running a simple build and input is not recognized. Works fine in editor

My input here:

image

None of these, nor Unity's XR Interaction managers default grab input are working. Ideas?

flipwon commented 4 years ago

Tried with a fresh project with just an XR grab interactable and same deal, unity's built in XR grab inputs aren't working in builds.

zite commented 4 years ago

We're in the process of moving towards OpenXR and are no longer supporting legacy input modes (Unity XR Input) in new plugins. For now we recommend using the SteamVR Unity Plugin for input. For more information check out these posts: https://steamcommunity.com/app/250820/discussions/7/2574319296475936754/ https://steamcommunity.com/games/250820/announcements/detail/2522527900755718764

flipwon commented 4 years ago

This includes unity's new input system? I was unaware that was considered legacy.

flipwon commented 4 years ago

Also may want to change the readme, as it says otherwise.

hookmanuk commented 4 years ago

I had this issue with 2.6.0b1 of this plugin, where using OpenXR Grab worked fine in the editor, but not when built.

I've now upgraded to 2.6.0b2 and now no inputs work either in the editor or when built.

I'm unsure what input you're recommending we use? If I want to use Unity 2019 with OpenXR and my Index controllers (without finger tracking) then which versions of which plugins should I be using?

Does anyone have a working sample using Unity OpenXR with the latest version of SteamVR?

hookmanuk commented 4 years ago

So I went back to 2.6.0b1 and had another go at working out why the inputs worked in my editor, but not at runtime.

The issue was the bindings used by Steam VR. They were entirely different in the editor compared to at runtime.

I took screenshots (attached below) of the default bindings that worked in the editor. When I set them up like this at runtime too everything works! Note that I had to enable several of the bindings under the legacy actions tab by showing hidden actions. for them to be visible to bind.

I seem to have another issue running 2.6.0b2 now, that doesn't render anything anywhere. Not too sure why... but I'm happy enough I can at least publish a build now.

There's probably a better way to set these up through the config json files, but I couldn't work out how to do that...

LegacyDefaults+0 LegacyDefaults+1

zite commented 4 years ago

This includes unity's new input system? I was unaware that was considered legacy.

The way we implemented Unity XR Input was through the SteamVR legacy input pipeline, as it agrees the most with unity's new input system. However, there were significant incompatibilities and we're now looking to devote our efforts towards OpenXR as it should provide more future facing compatibility.

hookmanuk commented 4 years ago

Just tried upgrading to 2.6.0b3, but I have the same problem as 2.6.0b2. No inputs on my Index controllers work, no matter what custom bindings or inputs in the unity input manager are set up.

It just seems entirely broken. The only version I can working is 2.6.0b1 using the custom controller config as above.

Is this going to be fixed before a full release? Are there any instructions working with the latest version on how to actually bind controllers through steam to OpenXR inputs?

zite commented 4 years ago

The OpenVR XR Plugin currently does not provide input. We recommend using SteamVR Input via the SteamVR Unity Plugin. We hope this will eventually get consolidated with OpenXR.

hookmanuk commented 4 years ago

The input compatibility is really confusing at the moment. 10 days ago you said Unity XR Input is through the SteamVR legacy input pipeline (which I agree with, that mostly works fine in 2.6.0b1 for me). However now you're saying OpenVR XR Plugin doesn't provide input.

When writing a potentially cross platform game, it would be much easier if we could just use the previously described and working XR input. Has this legacy code been removed from recent versions, or I am just missing some settings for why it works in b1 but not in b2 or b3 for me?

hookmanuk commented 4 years ago

Looking further into this, I see the release notes on Steam for 2.6.0b2 actually mentioned switching from legacy support to steamvr.

Someone asked the question whether this meant legacy support is now removed and if that was a permanent change, no-one replied though.

https://steamcommunity.com/app/250820/discussions/7/2574319296475936754/

flipwon commented 4 years ago

Yeah, I just gave up on it. I don't care to have 5 different plugins to get one thing to work as intended. It's way too much work for simple input.

I'll come back to it when it's complete.

zite commented 4 years ago

Legacy support being removed is a permanent change for the OpenVR plugin. We're now focusing efforts on OpenXR.