Basic Passthrough Tutorial with Building Blocks
Updated: Feb 18, 2025
This is a basic tutorial that lets you quickly test the passthrough implementation. Unlike the
Passthrough Basic Tutorial, this tutorial uses
Building Blocks, which simplifies the operation greatly. It also allows you to monitor your running application using the
Meta XR Simulator, so you don’t need to switch to your headset during development or testing. Once built, you can use this completed tutorial as a starter project for the other Passthrough tutorials that follow.
Before you begin this tutorial, it is important to make sure the following checklist is complete.
- Have a Meta Quest 2, Meta Quest Pro, or Meta Quest 3 headset ready to use. Make sure you have installed the latest software version.
- Install the latest Unity LTS version (Unity 6+ is recommended).
- Follow the steps documented in the Set Up Unity for XR Development topic to download the Meta XR Core SDK.
- You must use the SDK v57 or newer. Building Blocks is a new feature with v57.
- Right-click the current scene, and choose Save Scene As. Use the name PassthroughBasicWith BB.
- Remove all components from the scene.
- On the menu, go to Meta > Tools > Building Blocks to display the UI dialog.
Add passthrough using Building Blocks - In the lower right of the Background Passthrough building block, click the plus sign. Two building blocks are added to your scene: [BB] Camera Rig and [BB] Background Passthrough.
- Close the Building Blocks dialog.
- On the menu, go to GameObject > 3D Object, and select Sphere.
- Select the 3D object and then on the Inspector tab, set the position (X, Y, Z) to (1, 0, 1) and scale to (X, Y, Z) to (0.25, 0.25, 0.25).
- On the menu, go to Assets > Create > Material and rename the material to ball-color.
- On the Inspector tab, under Main Maps, click the Albedo color field to open a color picker, and then change the color to your choice.
- Drag and drop the material on the sphere.
- Save your scene and project.
- On the menu, go to File > Build Settings.
- In the Platform pane, choose Windows.
- Close the Build Settings window.
- On the menu, go to Edit > Project Settings.
- Choose Meta XR to display the Project Setup Tool.
- Click Fix to resolve any open issues that the tool has detected.
- Close the Project Settings window and save your project.
Your project should resemble the image below:
- On the menu, go to Meta > Meta XR Simulator > Activate to activate the simulator.
- On the menu, go to Meta > Meta XR Simulator > Synthetic Environment Server > Game Room.
- After the Game Room window appears, minimize it. Then click the Unity Play button.