How do I get the Oculus Quest 2 to work in the Unity editor?

Hey,

I’ve just started working with VR as an Oculust Quest 2 developer. Everything is set up just fine and working as expected; I can push my builds to the headset with no problem. But there’s a major issue: I can’t run what I’m developing in the headset via the Unity editor. If I click “run”, it runs on my computer, but nothing goes on in the headset and the XR Rig in the scene doesn’t move — not even the gamepads. That means I have to push a build to the headset every time I want to test something out, and that can’t possibly be the only way. Not only does the building process take up to several minutes as opposed to a few seconds in the editor, I also can’t access the inspector or the console (essential unity development tools) while playing the build.

Now, I understand the Oculus Quest 2 is a standalone headset that isn’t dependent on a host computer — but still, there must be some way for developers to test it out directly inside Unity. As far as I know, however, no official documentation deals directly with this. I’ve followed a few tutorials and tried everything explained therein, to no avail. I have the Oculus app up and running, with my device listed as active. I can even use the virtual desktop in the Oculus Link menu. But I can’t get the Oculus Quest 2 to work directly with Unity. No errors, no pop-ups, it just flat out doesn’t work — nothing goes on in the headset when I click run.

I’ve also read conflicting statements about the ($99!!) official Oculus Link cable. Some say it’s required for what I’m looking for, some say it isn’t and the USB-to-USBC you use for charging and connecting will do just fine. What’s up with that?

I’m just starting out with VR, and having to build every time I want to check something out makes the learning process almost impossibly fastidious. Any help would be much appreciated. Cheers!

Connect with Link (must be done in the Quests native UI a few times per day as it defaults to standalone all of the time), any decent USB 3 to type C cable can do it, but you’ll want one with good quality wires if using a long tether. Once you’re running the normal desktop Oculus app UI on the Quest after linking you just need to click play in editor, like every other headset.

Thank you for your response.

I do use a decent USB3 cable; I switched to that one after the first one I used (which does look poorly built) was flagged as USB2 by the Oculus app.

I’m not sure I understand. What do you mean by “running the normal desktop oculus app UI on the quest” precisely? I have the Oculus Quest 2 set to Link mode and my desktop running the Oculus app which lists my device as active, but nothing happens in the headset if I click run in Unity.

I mean run the normal Oculus desktop app required to run any Oculus headset on the PC, the “Oculus Home” which pops up when you press the Oculus button on the right controller…

Then you click play like you would for absolutely any other desktop VR app. It’s that simple.

Get something on steam or the Oculus store to pay to see if that works.

Try a simple demo VR scene if you’re Unity VR configuration isn’t working… Make sure you’re initializing VR within unity and have a rig setup for whatever VR plug-in you’re using… Don’t blindly follow VR tutorials for plugins you aren’t using…

I do. I can even access the virtual desktop via Link.

If it was that simple, I wouldn’t have created this thread. When I click run in Unity, nothing notable happens — that’s the issue. Unity runs, I can see that on my computer monitor (and on the Link virtual desktop obviously) but neither the headset nor the controllers affect runtime.

I gave VR Chat a try; it works. It runs, and both headset and controllers operate properly.

A simple demo scene is what I have. I’m using the XR Rig, which works perfectly fine when I push builds to the headset.

One more thing to check is to make sure Oculus being selected under XR Plugin-Management for PC platform, screenshot like below.

This was my issue. I was reading somewhere if you were in android you just had to have android selected. Selecting Oculus for Android and PC gave me an error. Selecting PC while on Android did the trick.