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

Trouble getting SteamVR Input to work with OpenVR XR Plugin #9

Closed
ll-M-ll opened this issue Jul 15, 2020 · 30 comments
Closed

Trouble getting SteamVR Input to work with OpenVR XR Plugin #9

ll-M-ll opened this issue Jul 15, 2020 · 30 comments
Labels
duplicate This issue or pull request already exists

Comments

@ll-M-ll
Copy link

ll-M-ll commented Jul 15, 2020

Apparently SteamVR-XRPlugin beta doesn't work at all, Or maybe i dont know how to use it, Because when I finally got everything to work I've noticed that none of my input were working, I have switched the input system twice trying to figure out why but in the end I've come to the conclusion either SteamVR input doesn't work as long as XR plugin is active or I just am not using it right.... the Old code that used to move the player using SteamVR is no longer detecting anything.

things I've tried :
1 - removing and disabling components.
2- I used Debug.log approach to see where the rabbit hole in my code.
3- steamVR live input, it wasn't detecting anything.
4- I switched between the new and the old Input system, Neither of them worked.

On the other hand when I used XR INPUT DEBUGGER with the new input system
everything I did was working was being detected correctly

@kisak-valve kisak-valve transferred this issue from ValveSoftware/steamvr_unity_plugin Jul 15, 2020
@zite
Copy link
Collaborator

zite commented Jul 17, 2020

The current versions of the OpenVR Unity XR Plugin do not support the unity input system. For input you'll need to use SteamVR Input via the SteamVR Unity Plugin. We hope this will be consolidated with OpenXR.

@zite zite closed this as completed Jul 17, 2020
@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 17, 2020

The current versions of the OpenVR Unity XR Plugin do not support the unity input system. For input you'll need to use SteamVR Input via the SteamVR Unity Plugin. We hope this will be consolidated with OpenXR.

I know that is what I used, Even with the script it didn't read any input, all my SteamVR input weren't working, I hope you guys either give us a full tutorial on how to do this on a video ( 2 mins ) or please fix it with an update, because this is crucial to the deveopment workflow.

@zite
Copy link
Collaborator

zite commented Jul 22, 2020

Can you provide an editor.log when steamvr input is not working? What kind or errors are you seeing? You can find the editor.log in %localappdata%/Unity/Editor/Editor.log

@zite zite reopened this Jul 22, 2020
@zite zite added the needs more information Needs more information from the reporter label Jul 22, 2020
@zite zite changed the title [UnityXRPlugin-Branch ] The beta Version Is either USELESS or I don't know how to use it. Trouble getting SteamVR Input to work with OpenVR XR Plugin Jul 22, 2020
@totalschaden
Copy link

Cant get Input to work with Unitys New Input Manager, when the Plugin was still in Branch, Prev. 2, it was working just fine. Was it dropped ? Will it be available again in a later version ?
I moved back to Prev. 2 for now.

@zite
Copy link
Collaborator

zite commented Jul 29, 2020

I'm going to assume the original issue was resolved by an update. @totalschaden please see this issue: #16

@zite zite closed this as completed Jul 29, 2020
@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 29, 2020

@zite there is no log, i have 2 players.. steam code is there on the player it just doesn't detect anything, I've tried the live input of steam to make sure that it's not anything with the code. there is no input there.

@zite zite reopened this Jul 29, 2020
@zite
Copy link
Collaborator

zite commented Jul 29, 2020

@ll-M-ll I'm not sure I understand. You have an external player (not yourself) that isn't getting input? You should be able to get logs from builds as well. https://docs.unity3d.com/Manual/LogFiles.html

@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 29, 2020

ok I dont why it's hard to understand but
its simply not working:

when I use steamVR 2.5 I can move the player using the controllers
once I install steamVR2.6beta it nothing happens , no errors , no input , nothing... players is in the spawned location doing nothing.

@zite
Copy link
Collaborator

zite commented Jul 29, 2020

I'm trying to troubleshoot the issue with you so we can get your scenario working again. For that I need more information about your scenario. A log would be very helpful in determining why input is failing for you and not for other scenarios.

Have you enabled the OpenVR Loader in the XR Management settings window?

@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 29, 2020

@zite i keep getting this error every now and then
static Void PreferencesGUI() does not match UnityEditor.SettingsProviderAttribute expected signature. Use static UnityEditor.SettingsProvider signature() UnityEditor.SettingsWindow:OnEnable()

I can still clear it by clicking -clear its not a compiler issue.

I static Void PreferencesGUI() does not match UnityEditor.SettingsProviderAttribute expected signature.
Use static UnityEditor.SettingsProvider signature()
UnityEditor.SettingsWindow:OnEnable()`

and yes I have enabled OpenVRLoader and steamVR launched normally... I will try again tomorrow with preview10 ... I guess I have to delete XR and steamVR folder then install steamVRbeta3 , right ?

@zite
Copy link
Collaborator

zite commented Jul 29, 2020

I'm not sure what that error is unfortunately. Yeah, deleting and reinstalling is what I'd recommend. There will be a beta4 and preview 12 up by tomorrow that you should use. And if it doesn't work this time please send a log.

@zite
Copy link
Collaborator

zite commented Jul 30, 2020

Preview 12 is up along with beta4 of the steamvr unity plugin. I'd recommend deleting the SteamVR folder and reinstalling with this: https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.6.0b4

If it still doesn't work, make sure preview-12 of the OpenVR XR Plugin is installed, and try restarting unity a couple times. Sometimes unity seems to have issues releasing the DLLs.

@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 31, 2020

@zite ok I've deleted the SteamVR folder from the Assets folder then removed OpenVR DeskTop from the package Manger.
then I've installed 2.6.0b4 using the installer
I was greeted by this error on the console
static Void PreferencesGUI() does not match UnityEditor.SettingsProviderAttribute expected signature. Use static UnityEditor.SettingsProvider signature() UnityEditor.SettingsWindow:OpenProjectSettings()

then I've attempted to install XR plugin manager from the project Settings . there was a message that poped I think it was talking about builtIn XR and it wanted to replace it - I had 2 options yes and cancel ... I've tried the cancel .
open VR Loader was not there SO I've checked OpenVR Desktop from the package Manager it was installed

Also worst mentioning that I couldn't find any of the preview tools.
also I had this on my log
[SteamVR Setup] Installing OpenVR package... UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_AutoEnableVR:Update() (at Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs:219) UnityEditor.EditorApplication:Internal_CallUpdateFunctions(

so I've deleted the SteamVR folder again and removed OpenVR Desktop and attempted to reinstall the package again.
image
that is the end of it I guess.. no openVR Loader

@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 31, 2020

SO I've notice that 2.6.0b4 is for 2020.1 and 2.6.0b3 is for 2019.3/4 .. since that is what I'm using I have went to that link {https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/installer} after installing 2.6.0b4 that got me the OpenVR loader.

/Library/PackageCache/com.valvesoftware.unity.openvr@1.0.0-preview.12/Runtime/x64/XRSDKOpenVR.dll' with error 'The specified procedure could not be found. '. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
maybe that was because SteamVR was not on .. so I turned it on and cleared the message , it didn't pop back on my console again.

I'll test the game and come bak

@zite
Copy link
Collaborator

zite commented Jul 31, 2020

FYI, OpenVR Desktop is a unity made package that is for Unity 2019.4 and below. It uses the old VR interfaces that they depreciated. OpenVR XR Plugin is what you'll need for 2020.1 and above.
Thanks for doing all this troubleshooting. I think we're all trying to get to an SDK abstraction that's easy to use, but that can be a struggle at times.

@ll-M-ll
Copy link
Author

ll-M-ll commented Jul 31, 2020

@zite I got those issues on Running >
(2 times)
Plugins: Failed to load ....../Library/PackageCache/com.valvesoftware.unity.openvr@1.0.0-preview.12/Runtime/x64/XRSDKOpenVR.dll' with error 'The specified procedure could not be found. '. UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad()
( 1 )time only
Failed to load '....../Library/PackageCache/com.valvesoftware.unity.openvr@1.0.0-preview.12/Runtime/x64/XRSDKOpenVR.dll' with error 'The specified procedure could not be found. '. Unity.XR.OpenVR.OpenVRLoader:Initialize() (at Library/PackageCache/com.valvesoftware.unity.openvr@1.0.0-preview.12/Runtime/OpenVRLoader.cs:183) UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad()
( 1 )time
DllNotFoundException: XRSDKOpenVR Unity.XR.OpenVR.OpenVRLoader.Initialize () (at Library/PackageCache/com.valvesoftware.unity.openvr@1.0.0-preview.12/Runtime/OpenVRLoader.cs:183) UnityEngine.XR.Management.XRManagerSettings.InitializeLoaderSync () (at Library/PackageCache/com.unity.xr.management@3.2.13/Runtime/XRManagerSettings.cs:169) UnityEngine.XR.Management.XRGeneralSettings.InitXRSDK () (at Library/PackageCache/com.unity.xr.management@3.2.13/Runtime/XRGeneralSettings.cs:175) UnityEngine.XR.Management.XRGeneralSettings.AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/com.unity.xr.management@3.2.13/Runtime/XRGeneralSettings.cs:148)
`

@zite
Copy link
Collaborator

zite commented Aug 1, 2020

That seems crazy. Can you verify that the package installed the dll correctly? Go to your project directory, then /Library/PackageCache/com.valvesoftware.unity.openvr@1.0.0-preview.12/Runtime/x64/ and let me know what the filesize of XRSDKOpenVR.dll

@ll-M-ll
Copy link
Author

ll-M-ll commented Aug 1, 2020

image

ok I have some compiler erros now but it's based on my code issue because I'm testing it on an older version
I will test it again and I'll let u know when I'm done
but all I've done is upgrading this from 2.1.2 to 2.1.4
image

or maybe because I relaunched the program.

@ll-M-ll
Copy link
Author

ll-M-ll commented Aug 1, 2020

I got the [cameraRig] prefab to work finally ... but it was lagging so badly and I had 2 errors
Screen position out of view frustum (screen pos 0.000000, 0.000000, 1000.000000) (Camera rect 0 0 1440 1792) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Screen position out of view frustum (screen pos 1440.000000, 0.000000, 1000.000000) (Camera rect 0 0 1440 1792) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

the position of the rig was 0,0.8,0

@zite
Copy link
Collaborator

zite commented Aug 2, 2020

Were there any warnings? Were those errors being repeated? Those errors are a known issue we're working through on start, but shouldn't cause lag.

@kajbeugels
Copy link

@zite I am having trouble getting Input to work for OpenVR hardware, the documentation and information about this subject is very limited, so I might misunderstand, but if I understand it correctly the OpenXR package for Unity is only rendering, there currently is no way for detecting (button!) input using only the OpenXR package?

I am trying to avoid using SteamVRs input, and instead handle all Input through Unitys Input system, but it seems this isn't possible at the moment.

And if button Input for OpenVR devices is indeed not working through OpenXR, can you say when/if it's going to come?

@zite
Copy link
Collaborator

zite commented Aug 28, 2020 via email

@kajbeugels
Copy link

Alright thanks for getting back, you are totally right about the current state of development for VR being confusing, I hope OpenXR will unify all of the platforms for us developers.

I will stick to SteamVR for now then, thanks for the quick response!

@ROBYER1
Copy link

ROBYER1 commented Sep 23, 2020

The current versions of the OpenVR Unity XR Plugin do not support the unity input system. For input you'll need to use SteamVR Input via the SteamVR Unity Plugin. We hope this will be consolidated with OpenXR.

Is there any roadmap or timeline for this?

@Immersive-Matthew
Copy link

I have read all the comments and cannot believe this issue is even a thing. How on earth was this even missed? Is this a Unity issue or Valve or both and like @ROBYER1 said, what is the timeline to get this addressed as I too need this fixed. As a Unity VR developer it is hard enough to make everything work without missing and critical parts in the stack.

@stevenjj
Copy link

stevenjj commented Sep 24, 2020

To directly answer your question, the OpenVR Unity XR plugin only does
rendering, not input. Currently you must use the SteamVR Unity Plugin
(SteamVR Input) to get vr input in unity 2020.1+. If you're on 2019 or
earlier you can still use the old stuff.

Thank you for clarifying this. The example interaction scene in SteamVR/InteractionSystem/Samples/Interactions_Example.unity works perfectly fine. So I was wondering why the HTC Pro Vive headset and controller tracking works but not the inputs when this plugin is tested with the example XR interactions package https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples (Tested with Unity 2020.1.3f1).

The simple workaround is to continue using the SteamVR input scripts, which shouldn't be an issue for those who have been developing with SteamVR but want to render via the latest Unity XR plugin.

Echoing @ROBYER1 's question is there a timeline or plan for integrating both the Unity and SteamVR input managers as a single API?

Thanks for your time.

@ceitel
Copy link

ceitel commented Sep 28, 2020

For anyone wondering, here is a list of the Device usages available through the UnityXR-Input system for the following loaders (running a WMR HMD)

OpenVR Loader:
DevicePosition, DeviceRotation, DeviceVelocity, DeviceAngularVelocity, TrackingState, IsTracked

WMR Loader:
TrackingState, IsTracked, DevicePosition, DeviceRotation, DeviceVelocity, DeviceAngularVelocity, BatteryLevel, Primary2DAxis, Primary2DAxisTouch, Primary2DAxisClick, Secondary2DAxis, Secondary2DAxisClick, Trigger, TriggerButton, Grip, GripButton, MenuButton, PointerPosition, PointerRotation, SourceLossRisk, SourceMitigationDirection

Seems strange to me that they were able to expose the select few common device usages that they did but chose(?) not to expose the others?

Is also frustrating that the Unity docs seem to tell another story of what usages are available:
https://docs.unity3d.com/2020.1/Documentation/Manual/xr_input.html

Echoing @ROBYER1 's question Is there any roadmap or timeline for this?

Thanks for your time

@ROBYER1
Copy link

ROBYER1 commented Sep 28, 2020

@ceitel Thanks for sharing, others will find that useful. I found those out the hard way unfortunately!

Again asking for a timeline or roadmap, even if it's vague.

@pollumi
Copy link

pollumi commented Oct 19, 2020

Hello @zite

Could you please give us some answers here? It is very annoying thing that we can't use Unity Interaction toolkit in 2020.x with Valve.

@zite zite added duplicate This issue or pull request already exists and removed needs more information Needs more information from the reporter labels Oct 20, 2020
@zite
Copy link
Collaborator

zite commented Oct 20, 2020

Closing as duplicate of #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

9 participants