has anyone had the problem of their unity VR project not showing up in the RIFT headset while running in the Unity Editor’s play mode?
The VR project works exactly as intended when I build and run on a an occulus quest.
It runs exactly as intended when I build and run on a PC: a razer laptop + Rift (not s)
But when in the unity editor - if I hit play - it does NOT show up in the RIFT headset.
I am currently using unity editor 2019.2.9f1
there are two SDKs installed under player settings: Occulus and OpenVR with occulus first.
I hear from other people that this seems to be a thing that “just works” for them - or has in the past.
Is there something simple I’m missing? A package or checkbox that says “show development in the headset”?
We are experiencing this same issue, the VR preview in the game view shows what we should see in the oculus headset, but the headset is rendering nothing. We will try the ‘off and on’ solution.
One interesting thing is this was only happening in editor, and now as of the last build, it also happens in the build.
The only thing I can pin it to is it happens more frequently if the VR headset isn’t engaged (sensor triggered and display on) when you click play.
We also occasionally experience black pixel like artefacts from within the headset, but not in the VR preview when observing through unity.
We are on Unity 2019.2.4f1 and using the Oculus (Desktop) and OpenVR (Desktop) packages.
I can confirm that I’ve also seen those black pixel artifacts, though it has been very rare for those. Most recently, (yesterday) I had a single large black box overlay the viewport in both eyes in the headset while nothing was visible on the output.
Like it was an alert box that was stuck or something. It appeared immediately after upgrading the oculus desktop software version and was fixed by uninstalling and reinstalling oculus desktop software.
As for the unity editor/play mode thing it just wound up being sporadic and “fixed itself” for a few days, then stop by and say hi for an hour or two… rinse and repeat.
Glad to hear I’m not the only one. Yeah, it is a very sporadic issue on our end too, which makes it even scarier.
It’s only recently that we started seeing it happen more frequently, and now every build will have the issue occasionally. Sometimes it will open without artifacts, and then, in a seemingly random circumstance, decide to bug out again.
One thing I am doing is handling the VR SDK loading myself, as it is a desktop/VR application that only needs VR in a specific scene, so my ‘Virtual Reality SDKs’ list starts with none. I’m also in singlepass.
Did you do anything on your end that may have indirectly fixed this issue like upgrading unity and/or downgrading unity or the oculus (Desktop) package?
I’m starting to think it’s simply due to the Oculus (Desktop) package being too far behind the current Oculus Plugin, which might be why this problem is escalating as the Oculus Software updates and evolves.
Maybe I could manually replace the OVRPlugin provided by the oculus desktop package cache and see if that resolves the issue, I’ll let you know if I have any luck.
@alexchesser I think I may have found out why this happens. I’m fairly sure this has something to do with delaying the activation of an object that has the VR camera. Potentially is to do with VR loading, while no cameras setup for VR are enabled.
I thought at first the issue might be related to hierarchy depth, but testing in isolation proved this to be incorrect.
However, If I turn off the VR rig game object, and write a script that delays the activation of the game object, I can recreate the issue frequently (not consistently, but it happens often). When I make sure the object with the VR camera, no matter what, is on by default, I have never had the issue arise (As of yet, hit play over 30 times and no black screen or black pixel artifacts). When turning back on the delayed activation, it happened very frequently when clicking play.
HOW TO PREVENT THIS ISSUE:
So my advice to prevent this. Keep your physical VR Rig completely decoupled from any deep hierarchies and ensure it is enabled at the point a VR SDK is loaded. Basically work and solve problems while always keeping the physical rig and camera out of it, the issue seemed so sporadic because over time, as hierarchies get more complex and polish gets added, this issue can arise with what seems to be, no real reason, and this can really put a massive roadblock in development.
I have no idea if this post is still being reviewed but I was tearing my hair out for a while about this. What fixed it for me was that I forgot to click on player settings and add plugin support for the PC! It was driving me nuts because I had another project that worked perfectly in play and install. So, to recap what you need to play Unity through link is:
USB C cable(cannot just be an Anker cable, learned that the hard way) - the cable has a blue piece of plastic inside the connector as opposed to black)
Need to enable developer mode in your headset (too many more steps to list in this post, you’ll need to look that up yourself)
You need the actual Oculus app downloaded(it is a long download) AND running on your machine
You need to enable beta link in your oculus headset once it’s plugged in.
Need Oculus XR Management and install Oculus plugin under BOTH the Android AND PC (if you are debugging on PC obviously) tabs
[Solved]
for me I didnt assign the SDK and JDK path correctly . you can check this issue . go to edit/Preferences/ExternalTools and check the SDk and Ndk and JDK path.
[Update]
we should also enable oculus link mode in quick settings. (in the cornet click on time and wifi icon then click on oculus link then the default enviroment should change, nowif you click on play mode of unity you will see your unity scene in your VR heaset.)
so the play does not work for me ether but if you build and play it’s displaying scene in the vr. i’m using usb-c cable from mac charger is this still the cable issue?
I have sort-of this problem with my own apps and the DistanceGrab sample scene; I can build to the Oculus Quest 2 and the scene shows there, but as a flat screen picture rather than immersive VR - controllers work, but not inside the scene. See screen capture below…
I have tried all the advice given above, and quite a bit more from elsewhere, but with no improvement. Any ideas?
Thank you for your interest. No, it is not a 360 deg flat panorama. What I mean is that the DistanceGrab does not render with the user at the center in 3D environment - as opposed to my screenshot above, the DistanceGrab sample scene (DistanceGrab Sample Scene | Oculus Developers) is supposed to look like this with the user in the middle, using hands to grab objects: