--- uid: arfoundation-camera-components --- # Camera components AR Foundation uses two primary components to control device camera functionality in your AR scene: [ARCameraManager](xref:UnityEngine.XR.ARFoundation.ARCameraManager) and [ARCameraBackground](xref:UnityEngine.XR.ARFoundation.ARCameraBackground). Your scene should contain at most one of each of these components enabled at a time. After initial [scene setup](xref:arfoundation-scene-setup) you can find AR Camera Manager and AR Camera Background components in the XR Origin GameObject hierarchy at **XR Origin** > **Camera Offset** > **Main Camera**. # AR Camera Manager component The [ARCameraManager](xref:UnityEngine.XR.ARFoundation.ARCameraManager) component is a [manager](xref:arfoundation-managers) that enables or disables the device camera when the component is enabled or disabled, respectively, and gives you a scripting interface for camera-related features. ![AR Camera Manager component](../../images/ar-camera-manager.png)
*AR Camera Manager component* | Property | Description | |:----------------------------------| :---------- | | **Auto Focus** | Enables or disables a request to use the camera's automatic focus mode. When disabled, fixed focus mode is used. Availability of **Auto Focus** depends on camera hardware. | | **Image Stabilization** | Helps stabilize shaky video from the camera. You can check the [XRCameraSubsystemDescriptor.supportsImageStabilization](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsImageStabilization) to determine whether your provider supports **Image Stabilization**. | | **Light Estimation** | Estimates lighting properties of the environment. There are five options: While you can request any of these simultaneously, support for each varies among devices. Some platforms might not be able to simultaneously provide all options, or it might depend on other features (for example, camera Facing Direction). | | **Facing Direction** | Controls which camera is used. This value can be either **World** or **User**. On handheld mobile devices like phones and tablets, **World** refers to the rear camera and **User** refers to the front-facing ("selfie") camera. | | **Render Mode** | Sets the `ARCameraManager`'s [requestedBackgroundRenderingMode](xref:UnityEngine.XR.ARFoundation.ARCameraManager.requestedBackgroundRenderingMode), which specifies the stage in Unity's render pipeline that the AR camera background is rendered. There are three options: | > [!NOTE] > After Opaques has slightly different rendering behavior beyond its render order. After Opaques also causes `ARCameraBackground` to render a fullscreen quad at the Camera's [farClipPlane](xref:UnityEngine.Camera.farClipPlane) to ensure that depth testing properly culls fragments that are behind opaque geometry. # AR Camera Background component The [ARCameraBackground](xref:UnityEngine.XR.ARFoundation.ARCameraBackground) component renders video from the device camera as the background of the scene. Enable this component to render the AR background, and disable it to disable background rendering. ![AR Camera Background component](../../images/ar-camera-background.png)
*AR Camera Background component* | Property | Description | | :------- | :---------- | | **Use Custom Material** | If you set **Use Custom Material** to **true**, `ARCameraBackground` uses the **Custom Material** you specify to render the background. | | **Custom Material** | Only visible if **Use Custom Material** is **true**. Set this property to use your own shader to render the background. AR Foundation uses the Material from the active provider plug-in by default, but you can override the default with your own Material. | [!include[](../../snippets/apple-arkit-trademark.md)]