In early 2025, Meta began allowing developers to access the camera feed from the Meta quest. This content is being curated for Vishaka’s spring project, to be able to situate 3D models in Unity onto a QR code/Aruco code in the physical world.
I used a repository to set up the QR code scanner. The associated video mainly goes through the first example, a color picker.
Meta Quest Passthrough Camera Access - Color Picker, Object Detection, QR Code, Frosted Glass & more
From this repository, I used Example 3. 📱 QR Code Tracking with ZXing
Purpose: Detect and track QR codes in real time. Open webviews or log-in to 3rd party services with ease.
Description: Similarly to the object detection sample, get QR code coordinated and projects them into 3D space. Detect QR codes and call their URLs. You can select between a multiple or single QR code mode. The sample is running at around 70 fps for multiple QR codes and a stable 72 fps for a single code.
Here are the steps listed for using example 3. QR Code Tracking
Open the QRCodeTracking scene to test real-time QR code detection and tracking.
Install NuGet for Unity
Click on the NuGet menu and then on Manage NuGet Packages. Search for the ZXing.Net package from Michael Jahn and install it.
Make sure in your Player Settings under Scripting Define Symbols you see ZXING_ENABLED. The ZXingDefineSymbolChecker class should automatically detect if ZXing.Net is installed and add the symbol.
In order to see the label of your QR code, you will also need to install TextMeshPro!
Build the scene and run the APK on your headset. Look at a QR code to see the marker in 3D space and URL of the QR code.
If you want to use a 3D model that spawns the QR code is visible, here are some steps:
Locate the current Marker prefab
You’ll need to create your own prefab of the model you want to use (with texture/material)
Drag the new prefab into the folder
Add component to the prefab for the MarkerController Script
In the hierarchy, adjust the QR code scanner object to point towards the new Marker instead
Prerequisites
Meta Quest Device: Ensure you are running on a Quest 3 or Quest 3s and your device is updated to HorizonOS v74 or later.
Unity: Recommended is Unity 6. Also runs on Unity 2022.3. LTS.
Camera Passthrough API does not work in the Editor or XR Simulator.
Get more information from the Meta Quest Developer Documentation
Caution: Every feature involving accessing the camera has significant impact on your application's performance. Be aware of this and ask yourself if the feature you are trying to implement can be done any other way besides using cameras.
Installation steps
Clone the Repository:
Open the Project in Unity: Launch Unity and open the cloned project folder.
Configure Dependencies: Follow the instructions in the section below to run one of the samples.