Project Setup for VR/XR
Last updated
Last updated
Before being able to test passthrough in Unity using Quest Link (rather than using a cable) you need to enable it in the Oculus Desktop App.
The headset will not display the passthrough environment on the headset if you do not do this.
Go to the Oculus Desktop App (v37.0 or later).
Go to the Settings > Beta section.
Enable 'Developer Runtime features'.
Enable 'Passthrough over Meta Quest Link'.
You will need to restart Unity if you do this after creating the Unity Project in order for it to work correctly.
Go to the 'Edit Menu / Project Settings / Meta XR' category.
You can also open this at the bottom right of the Unity Window with the Meta Logo.
Make sure to 'Fix All' and 'Apply All' to both Desktop and Android categories in order to make sure the Project Environment is set up correctly.
Depending on the situation you may need to work through custom Errors and/or Warnings. Check Troubleshooting Tab above for more information.
If you are wanting to set up a VR environment, all you need to do is add the OVRCameraRig asset.
Delete the 'MainCamera' in the Project window.
Go to the Project window and search for 'OVRCameraRigInteraction' for a more complete setup (such as hands etc).
You may need to set the 'Search' pulldown at the top Left of the Project window to 'All' or 'In Packages'.
Use the Slider at bottom left of the Project Window to adjust asset view to List.
You can search for 'OVRCameraRig' for a more basic Camera setup if you like.
Once added, go to the 'OVRCameraRig' asset and modify settings as needed.
This may be a child of the 'OVRCameraRigInteraction' asset.
Set the Tracking Origin type to 'Stage' if you want the camera to be based on the real world floor position.
Adjust the 'Hand Tracking Support' to your desired input type :
Controllers Only
Controllers and Hands
Hands Only
Place an object, such as a cube, in your space for reference.
Note the default cube is 1m x 1m x 1m, so adjust accordingly.
Make sure the Oculus Desktop App is running, and your Quest is connected via Cable or through Quest Link.
If you can see the Meta Desktop Environment on your headset, you can hit 'Play' in Unity and it should load the environment into the headset.
If you are wanting to add XR Passthrough effect to your experience, where the headset can see through the headset cameras to the real world, you will need to add some further elements covered in the next tutorial at Project Setup for XR.
If you just want a VR experience, you can skip ahead to Movement - Teleportation.