Get Started with Passthrough
Updated: Sep 3, 2024
Before using Passthrough, you should update your device to the latest Meta Quest operating system. See
Update your Meta Quest software to update your Meta Quest.
To get started with Passthrough, set up the Unreal Engine project with the following settings:
On the menu, go to Edit > Project Settings > Meta XR, and change the following settings:
- Under General, set XR API to Oclulus OVRPlugin + OpenXR backend.
- Under Mobile, set Passthrough Enabled to True.
Depending on the type of passthrough you want, do either of the following:
- Automatic environment depth reconstruction
- This type of passthrough applies on the full screen and can stay alive for the whole duration of the app. See Persistent Passthrough for more information.
- Bring the Passthrough Subsystem in any Blueprint by right clicking in the Event Graph and searching for get passthrough subsystem. From the subsystem node call the Initialize Persistent Passthrough method.
You can then configure the passthrough layer from the Details tab when selecting the node.

- User-defined surface
- This type of passthrough only applies to specific user-defined geometry surface(s), and stays alive as long as the Passthrough Layer component exists. See Surface Projected Passthrough for more information.
- Add an OculusXRPassthroughLayer component in any Blueprint and set its Stereo Layer Shape to User Defined Passthrough Layer.
This can be done via the components tab of an Actor blueprint. In Add Component, type oculus to find OculusXRPassthroughLayer. You can then configure the passthrough layer in the Details tab.
You can also add the component in runtime with the Add OculusXR Passthrough Layer Component node. Select the node to configure the layer in the Details tab.
Configure the passthrough layer. The following list describes the standard settings
- The Layer Placement orders the layer related to the scene rendering. Depending on the Placement setting, passthrough will be composited on top of the application (Overlay) or beneath the application (Underlay). If multiple layers are present (including other passthrough layers), use Priority to define the ordering between the layers.
- The Texture Opacity Factor controls the opacity of the whole passthrough texture.
- You can customize the passthrough layer further using the additional settings.

Wait until Passthough is ready
Passthrough is asynchronous by nature. Even though you can create a Passthrough layer instantly, its content may not be ready for rendering for several frames. This leads to a brief black frame gap. You can avoid this by using the LayerResumed event, which is emitted once the layer is fully initialized and populated with the Passthrough content.
Example usage:

The event is also available with Persistent Passthrough:

Enable based on system recommendation
You can show a VR or Passthrough background in your app based on user choice. Meta Quest devices already provide users with this choice in the home environment, and your app can leverage the user’s home environment preference. We recommend that apps default to MR or VR based on user preferences. This recommendation is available using UOculusXRFunctionLibrary::IsPassthroughRecommended()
either through C++ or Blueprints.