I have watched a couple video tutorials and read several posts. I want to start a new VR game for SteamVR and eventually the Quest. For now I am just trying to get it working in the Unity Editor so I can develop the game.
I ended up with Unity 2020.2 + OpenXR + Action Based Input XR system in Unity.
I followed Andrew’s video here:
I did the presets and preview packages and all as indicated in that video.
I have an Oculus Quest 2. I am able to play all SteamVR games using both Virtual Desktop and Oculus Link cables. I also play Elite Dangerous with both of those setups, so I know the head tracking and controllers all work on this PC.
I have also installed the latest SteamVR [beta] 1.16.1 and verified that all my games still work fine. I have all the latest packages for XR and VR and have selected as best I can tell all the correct options in the Unity project settings.
When I hit play on my game Oculus and SteamVR both start up and I can see my scene. When I move my head around the head tracking works great.
The problem is that the controllers do nothing. I can see the red “lines” from the controllers sitting on the ground.
It doesn’t matter whether I am using the Link cable or Virtual Desktop.
When I look at the SteamVR window showing the status of the headset and controllers they all show good and tracking as you can see in this image: SteamVR Tracking.PNG - Google Drive
Try using the oculus runtime instead. In the Project Settings > XR > OpenXR you can select the runtime, if oculus is in that list select that.
Make sure Lock Input to Game View is checked in the input debugger. Open the input debugger using (Windows > Analysis > Input Debugger) in the input debugger choose (Options > Lock Input To Game View)
When running in play mode you can also look in the input debugger under devices and see if the controllers are showing up.
If none of that works if you could package up your project (sans the library folder) and send it we can take a look and see what is going on.
I will do all of that and get back to you. One question: What package do I need to install in order to have the oculus runtime show up in the OpenXR settings? It might already be there, but I won’t be at that computer for a while, so I want to be prepared in case that setting is available and I have not installed the right package. Currently the only package installed is the OpenXR and then the other basic stuff.
It will show up in the list under (Project Settings > XR > OpenXR : OpenXR Runtime (Editor Instance Only)) if you have the oculus desktop app installed in the default location.
With OpenXR your machine has a single default runtime that it will use. In this case you are using the SteamVR runtime (which should still work) but you can temporarily bypass that runtime to use the Oculus runtime with that option. You can also switch your system to the Oculus runtime in the Oculus desktop app options I believe.
Ok. I will give that a try. Thank you. If it all fails I have just barely started this project, so I will be able to zip it up and send it if needed. I have learned to make sure everything is working in the VR setup before moving forward with actual game dev.
I tried changing the runtime engine. System Default brings up SteamVR. Oculus I have to have Oculus app running on the PC and have link connected before I start it.
Either one gives the same results. The head tracking works fine, but both controllers don’t work. I just see the red laser lines on the ground.
Having the same issue here, tried other bindings and it’s not work.
I think for now it’s better user the old xr rig.
Also Noticed that the game view need to be in focus for input system works, other wise they stop tracking the hmd!
unity 2020.2.0f1
So the question for me is can this be fixed? Obviously we want OpenXR to work. Is this a problem in the OpenXR for Unity or OpenXR in SteamVR or Oculus or what?
I would really like to use the latest stuff so I don’t have to switch it all out when I am deep into my project.
If this will take a while (more than a few weeks) to fix, what can everyone recommend I use? What version of Unity and what exact configuration for everything? My target is first SteamVR and then Quest native in that order of priority…
Sorry I didnt get a chance to look at this over the weekend. I found the issue in your project. If you click on the XRRig there is a component called Input Action Manager. Add an element to “Action Assets” list and choose the “XRI Default Input Actions” action asset. Once I did this everything seemed to be working.
I took at look at that script as I was not familiar with it myself and what it does is enable all the actions in that action asset. So basically because nothing was specified there there were no enabled actions so the controllers didnt respond.
Ok so you added it to your XRRig. When I was trying to figure out the solution I couldnt find a XRRig that had that component on it. I believe the XRController should be enabling those actions though, I will talk to the XRI team to confirm.
Checked with the XRI team. It looks like if XRController has non-reference actions specified then it will automatically enable those actions but if they are reference actions then they need to be enabled using something such as the InputActionManager. Hope that helps!
In the XRController the “Use Reference” checkbox will require the actions to be enabled, if you embed an action in there (no reference) then it will auto-enable.