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.
Configure Unreal Project
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.
Set up passthrough using Persistent Passthrough (recommended):
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.
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). The use of Overlay is deprecated and will not work over PC Link, this should be set to Underlay.
The Texture Opacity Factor controls the opacity of the whole passthrough texture.
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.