docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Set up passthrough

    Show users their physical surroundings behind your virtual content on Android XR devices.

    The passthrough camera captures real-time images of the external environment to provide the user with a view of their surroundings while they wear a headset. You can use passthrough to implement immersive mixed reality experiences by layering virtual content on top of passthrough images of the surrounding environment.

    On Android XR devices, AR Foundation's camera subsystem controls passthrough, so you enable and disable passthrough with the AR Camera Manager component.

    Prerequisites

    Before you set up passthrough, complete the following tasks:

    • Enable the Android XR: Camera (Passthrough) feature. For instructions, refer to Configure project settings.
    • Configure your scene camera to have a transparent background, which is a solid color background with an alpha value of 0. If the background isn't transparent, it renders in front of the passthrough video and hides it. For instructions, refer to Configure camera background for passthrough.

    Enable passthrough

    Android XR passthrough doesn't require the AR Camera Background component. If the AR Camera Background component is in your scene, it has no effect on Android XR devices. If your scene only targets Android XR devices, you can safely delete the AR Camera Background component from your XR Origin's Main Camera GameObject.

    If your app uses light estimation, don't enable the AR Camera Manager component in the Unity Editor. Instead, enable it at runtime after the user grants the required permission, as described in Request light estimation permission.

    To enable passthrough in your scene:

    1. In the Hierarchy window, select the XR Origin > Camera Offset > Main Camera GameObject.
    2. In the Inspector window, enable the AR Camera Manager component.

    When the AR Camera Manager component is enabled, the device displays passthrough video behind your virtual content. To disable passthrough, disable the AR Camera Manager component.

    To check whether the passthrough camera is ready for use, call GetPassthroughCameraState. To access this method, cast the AR Camera Manager component's subsystem property to AndroidOpenXRCameraSubsystem after you enable the component. The camera is ready for use when the returned state is ARPassthroughCameraState.Ready. If the device runtime doesn't support the XR_ANDROID_passthrough_camera_state OpenXR extension, the method returns an error status.

    Additional resources

    • Control passthrough dimming
    • Set up your scene
    • Camera components (AR Foundation)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)