June 5, 2023 - [Complete Beginner]
If this is your first time working in Unity VR I recommend starting a new project with the VR Core template. All the recommended packages and base settings will be included leaving us with very little left to set up.
Open your Unity Hub and under ‘All templates’ search for ‘VR Core’ (this series will be using Unity Editor Version 2022.1.19f). Select or download and select the template if you haven’t already. Give your project a name and pick a location. Click the Create Project button.
Once your project has been created you’ll need to decide on a Plug-in Provider. Personally I like to use OpenXR because it will run on multiple types of headset. From the top left menu bar go to Edit and select Project Settings, this will open a new Project Settings window. Navigate to XR Plug-in Management and select OpenXR.
Now that we’ve chosen OpenXR we need to tell Unity which headset we are going to be working with while building our project. This is done by adding an interaction profile. You’ll notice a little yellow ‘Issues triangle’ beside the checked OpenXR option. Just hovering over it gives a quick tip, go ahead and click on it to open a small window detailing the ‘Issues’ so we can fix them.
Press the Edit button in the Issues window. It’ll take you to the OpenXR tab where you can click on the plus button under Interaction Profiles to add a new Interaction Profile. In my case I’ll be using an Oculus Quest 2 so I’ll select the Oculus Touch Controller Profile. Choose the appropriate profile for your specific headset.
Put on your headset, jump into your Quest Link (follow this article from Meta if you haven’t Set Up a Quest Link before), and press the Play button in the Unity Editor to start the VR experience!
If you want to move around and navigate through the empty plane look up tutorials on Locomotion. The two main ways of moving are Continuous Movement and Teleportation. For looking around (besides just moving your head) look up how to add a Snap Turn Provider.
If you don’t like the default hand controllers look up tutorials on custom VR hands that can even be animated when grabbing or pointing at things. For an even more advanced controller system look up Hand Tracking in VR where you don’t even need to hold your physical controllers.
If you want to learn how to use your hand controllers to interact with game objects in your VR world check out the next blog: Interactions in Unity VR where you can learn the types of interactions you can do and how to add them to your project.