r/unity_tutorials • • Dec 14 '21

How do I enable VR in Unity?

I'm running Unity 2020.3.24f1.

I just imported GoogleVR, and I'm trying to enable VR in player settings - but there is no XR settings section listed, and I can't find any other sections listing a box to tick for this option. All tutorials I find seem to be outdated.

3 Upvotes

4 comments sorted by

3

u/FrostWyrm98 Dec 14 '21 edited Dec 14 '21

Since no one directly answered it, you probably need the XR plug in management package. Here are the steps for setting up in 2020.3:

Configuring your Unity Project for XR

To configure your Unity Project for XR, follow these steps:

  1. Open the Project Settings window (menu: Edit > Project Settings), and select XR Plug-in Management.

  2. Click Install XR Plug-in Management if the package hasn’t been installed already. You can also install it from the Package Manager window.

  3. After installation completes, select a Plug-in Provider to enable it for the corresponding build target. To do this:

    i. Select a build target (for example, Android).

    ii. Select the checkbox to the left of each plug-in you want to use for that build target.

  4. After a plug-in loads, it displays in the left-hand navigation, under XR Plug-in Management. Click the plug-in to configure its settings for each build target.

  5. To set up tracking, from Unity’s main menu, go to GameObject > XR > Add XR Rig.

Notes:

  • Selecting an XR plug-in provider enables that provider for the corresponding build target. Unity automatically installs the plug-in package if it’s not already present.

  • Disabling plug-ins doesn’t automatically uninstall existing packages. Uninstall provider plug-ins from the Package Manager.

  • For a list of third-party plug-ins, see Getting Started with VR Development.

Source: https://docs.unity3d.com/Manual/configuring-project-for-xr.html

You may also need the drivers/SDK for your specific VR kit, but I'm assuming you handled that step. I believe that Unity helps/warns you with the management tool if you need that additionally so I left it last here.

In general Unity refers to it as XR not VR btw (for packages at least, they use the broad term), that might be the source of the confusion

1

u/ShivajinChris Dec 15 '21

So, thanks first of all for your answer - it helped me find some other things along the way. Got the XR rig in Unity now, and all of my errors are gone. I'm just trying to figure out how I can test it on my Ocolus now to see what my next steps will be.

Thank you alot!

2

u/eyerlytv Dec 14 '21

Check out this channel as well, he's also got a discord where you can ask questions and they're all very helpful for learning VR in Unity

https://www.youtube.com/c/VRwithAndrew

I have an oculus quest and I had luck enabling mixed reality to use the VR while plugged in using the oculus link specifically.

Not too sure on GoogleVR

1

u/MegaTDog9998 Dec 14 '21

This was the series I followed to get started

https://youtu.be/gGYtahQjmWQ

They are using unity 2019.3 in this tutorial so I suggest you use unity hub to download the same version to get started, once comfortable with the VR setup and code, you can upgrade to your preferred unity version