To preview a scene in a headset, you must use the Meta Quest Link app on a Windows machine to connect to the headset. To simulate the headset view on a macOS (ARM only) or Windows machine, install the Meta XR Simulator asset in your Unity project.
On each asset page, click Add to My Assets. The following image shows the button for the Meta XR Core SDK:
Create a Unity project
Follow the steps below to create a new 3D Unity project in Unity Hub:
Select Projects in the left navigation bar, then click New project.
Select Unity Editor version 6.1 or later.
Select the Universal 3D template, an empty Unity 3D project built on the Universal Render Pipeline (URP).
Enter your project name, a save location, and a Unity organization.
Click Create project.
Install the Unity OpenXR plugin
Select Edit > Project Settings from the Unity Editor menu.
Select XR Plug-in Management on the left of the Project Settings window.
If XR Plugin Management is not installed, click Install XR Plugin Management.
Check the OpenXR provider in the standalone group tab.
Check the OpenXR provider in the Meta group tab.
Add and select the Meta Quest build platform
In the Unity editor menu, select File > Build Profiles.
Under Platforms, select Meta Quest and click Enable Platform. If you already installed the profile, click the Switch Platform button.
If prompted to install com.unity.xr.openxr, click Install.
Unity versions prior to 6.1
If the Meta Quest platform is absent from your version of Unity, select the Android build platform.
Add Meta XR SDKs to your project
In the Unity Editor menu, select Window > Package Management > Package Manager.
Select My Assets in the Package Manager window. The Meta XR assets you added from the Unity Asset Store should appear.
Select the Meta XR Core SDK and click Install.
If prompted to enable the Meta XR feature set, select Enable.
If the feature set isn't enabled, activate it by navigating to Edit > Project Settings. Select XR Plug-in Management and make sure the Meta XR Feature group is checked in both the standalone and Meta group tabs.
When Unity prompts you to restart the Unity Editor, select Restart Editor.
After the Unity Editor reopens, in the Package Manager window, select the Meta XR Interaction SDK and click Install.
Unity prompts you about the Skeleton Upgrade, select Use OpenXR Hand.
Select Meta XR Simulator and click Install.
Use the Project Setup Tool to update the configuration
From the top of the Unity Editor, expand the Meta XR Tools drop-down list, and then select Project Setup Tool.
Click Fix All and Apply All in both the standalone and the Meta tabs.
Use Project Validation to update the configuration
Click Fix All in both the standalone and the Meta tabs.
Confirm OpenXR Feature Groups are selected
Navigate to Project Settings > XR Plug-In Management > OpenXR and select the Android tab.
Select Meta XR in the OpenXR Feature Groups section to filter the list.
Make sure the Meta XR Feature, Meta XR Foveation, and Meta XR Subsampled Layout are enabled.
Step 3: Add Building Blocks to your scene
Building Blocks are modular components included in Meta XR SDKs that you can use to quickly access Meta Quest features such as controller and hand tracking.
Follow these steps to add Building Blocks to your scene:
Add a camera rig
In the Hierarchy pane, delete Main Camera from your project’s SampleScene.
Select Meta XR Tools > Building Blocks from the drop-down toolbar menu in your editor.
In the Building Blocks window, find the Camera Rig Building Block, and select the icon on the bottom right of the block to add it to your project.
Verify that the Camera Rig object is in the Hierarchy pane.
Add a grab interaction
Select Meta XR Tools > Building Blocks from the drop-down toolbar menu in your editor.
In the Building Blocks window, find the Grab Interaction Building Block, and select the icon on the bottom right of the block to add it to your project.
Select [BuildingBlock] Cube in the Hierarchy.
In the Inspector, under Transform, change the Position values to (0, 1, 0.25) to reposition it into view.
Step 4: Preview your scene
If you lack the required hardware to preview the scene on a Meta Quest device, follow the steps in
Simulate Builds with XR Simulator to preview it on your computer.
Otherwise, follow the steps below to preview your scene on your headset.
Pair your headset with the Meta Horizon mobile app
In the app, tap the hamburger menu (the icon with three horizontal lines) next to the search bar.
Then, tap Devices and select your headset from the results.
Video: Shows selection of the Devices item in the hamburger menu.
Tap Headset Settings beneath the image of your headset.
Tap Developer Mode.
Turn on the Developer Mode toggle switch.
Use a USB-C cable to connect the headset to your computer.
Put on the headset.
In the headset, go to Settings > Advanced > Developer, and then enable Enable custom settings and MTP Notification.
When asked to allow USB debugging, select Always allow from this computer.
Important
Developer Mode is intended for development tasks such as running, debugging and testing applications. Engaging in other activities may result in account limitations, suspension, or termination. For more information, see Content Guidelines.
Click the Play button at the top of the Unity Editor.
Use your hand to grab the VR cube by making a pinching gesture.
Use your controller to grab the VR cube by using the grip button.
You have completed this tutorial and now have a Unity 3D project that you can use to develop apps for Meta Quest VR headsets.
Explore the resources in the next section to continue your learning journey.
Learn more
Continue your learning using the following resources: