In early 2025, Meta began allowing developers to access the camera feed from the Meta quest. This page is meant to give a quick overview of how to get started with accessing the passthrough cameras (webcam texture).
Using this video tutorial and examples from Meta provided the best overview of how to get set up with the webcam texture for passthrough camera access, using the Meta examples, and starting a project from scratch.
How to get started with camera access for Meta Quest 3 on Unity 6 - This video goes through both setting up the examples from the Oculus repository, as well as starting a project from scratch and adding the passthrough capabilities to it.
How to get started with camera access for Meta Quest 3 on Unity 6
For a new project with camera access, here are the steps this tutorial goes through:
Create a new universal 3D project (Using unity 6)
Add build profile for android
Go to player settings and change company name (optional)
Install MR kit -- window, package manager, install by name
com.meta.xr.utilitykit
Accept restarting the editor
Edit project settings
Install XR plugin management
Add openXR plugin provider for both PC and android, enable feature set for Meta
Under OpenXR plugin, add support for controllers and tracking
Under project validation, fix all issues for PC and android
Delete all items from scene
Add Meta building block for camera rig, passthrough, and controllers/hand tracking as needed
Check the project setup tool -- under Meta XR tools, can fix most except about the scene in your project. Ignore this so that it just asks for permission once instead of many times in your app
Grab the passthroughcamera folder from the sample assets, which has ready made prefab for what we need
Now, you can drag WebcamTextureManagerPrefab into the scene
In this prefab you can choose which camera you use, and the resolution
You can adjust the permission part here too, its preset with a script that will only ask for permission once
Add a cube to the scene
Create a mono behavior script
Name it webcamtextureassigner
Use the code below as this script
Now assign the script to the cube
Adjust the android manifest to make sure permissions work
Create stock compatible manifest
Add one line of uses-permission: "horizonos.permission.HEADSET_CAMERA"
Save scene and now you can build!
Code for script:
using PassthroughCameraSamples;
using System.Collections;
using UnityEngine;
/// <summary>
/// Assigns the <see cref="WebCamTexture"/> of the Quest camera
/// to the <see cref="Renderer"/> component of the current game object.
/// </summary>
[RequireComponent(typeof(Renderer))]
public class WebcamTextureAssigner : MonoBehaviour
{
/// <summary>
/// Start coroutine
/// </summary>
/// <returns></returns>
IEnumerator Start()
{
//references that will be filled by the coroutine
WebCamTextureManager webCamTextureManager = null;
WebCamTexture webCamTexture = null;
//wait until the WebCamTextureManager is found and is ready to provide a texture
do
{
yield return null;
//if the WebCamTextureManager is not found yet, find it
if (webCamTextureManager == null)
{
webCamTextureManager = FindFirstObjectByType<WebCamTextureManager>();
}
//else, if we have it, try to get the texture of the camera of the headset
else
{
webCamTexture = webCamTextureManager.WebCamTexture;
}
} while (webCamTexture == null);
//here we have the texture. Assign it to the main texture of the main material of the renderer
GetComponent<Renderer>().material.mainTexture = webCamTexture;
}
}
From following this tutorial, you can create a cube that uses the passthrough camera's texture: