docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Set up your scene

    To set up your scene for Android XR, first follow the standard AR Foundation Scene setup process. If your scene will use the Android XR device's passthrough camera, refer to the following sections.

    Ensure that the Tracked Pose Driver component on your camera has "centerEyePosition [XR HMD]" included in the position and rotation input actions.

    Configure camera background for passthrough

    Android XR passthrough requires that your Camera's Background Color (Universal Render Pipeline) or Clear Flags (Built-In Render Pipeline) are set to Solid Color, with the Background color alpha channel value set to zero.

    Note

    The passthrough video is layered behind the image rendered by the scene camera. If you configure the camera's background color (or clear flags) to use a skybox or an opaque solid color, then the passthrough video is covered up by the camera background.

    If you have completed the AR Foundation scene setup steps, follow these instructions to configure your scene to render with a transparent camera background:

    1. Locate the GameObject named XR Origin in your GameObject hierarchy. (Refer to Scene setup in the AR Foundation manual for instructions on how to set up the scene if it does not already contain an XR Origin.)
    2. Expand the hierarchy to reveal the Camera Offset and Main Camera GameObjects.
    3. Inspect the Main Camera GameObject.
    4. Select from the following options. The options differ based on the render pipeline you're using:
      • URP: In the Environment section, set the Background Type to Solid Color.
      • Built-In Render Pipeline: Set Clear Flags to Solid Color.
    5. Select the Background color to open the color picker.
    6. Set the color's A value to 0.

    Your scene is now configured to support Android XR passthrough.

    Additional resources

    • Graphics settings
    • Scene setup (AR Foundation)
    In This Article
    Back to top
    Copyright © 2025 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)