The ARCore SDK for Unity was deprecated in 2021 and is no longer supported. Additionally, the ARCore SDK for Unity cannot be used with Unity 2020 and later. Developers starting new projects should instead use the ARCore Extensions for AR Foundation. This SDK should only be used by developers working on existing projects which are unable to migrate to AR Foundation.

Configuring the camera

Stay organized with collections Save and categorize content based on your preferences.

CameraConfig provides details of the camera configuration that ARCore uses to access the camera sensor for a given session. These details include, for example, the targeted capture frame rate and whether a depth sensor is present and used.

When creating a new ARCore session, ARCore uses ARCoreCameraConfigFilter to filter the camera config that best matches the list of available configs. You can use the CameraConfigFilter asset to narrow down the available camera configs for a given device at runtime by filtering based on your app's needs.

Common use cases for filtering are:

  • Limiting camera capture frame rate to 30 fps. This use case is guaranteed to be supported on all devices. On devices that support 60 fps, ARCore will prioritize camera configs that support that frame rate by default. To filter out all camera configs that support 60 fps, make sure that the Target 60FPS is unchecked, and Target 30FPS option is checked in the ARCoreCameraConfigFilter asset.

  • Prevent ARCore from using the depth sensor. This use case is guaranteed to be supported on all devices. On devices that have a supported depth sensor, ARCore prioritizes camera configs that use the depth sensor. To filter out all camera configs that use the depth sensor, make sure to check Do Not Use in the ARCoreCameraConfigFilter asset.

  • Selecting an alternate GPU texture resolution. On supported devices, ARCore may provide additional GPU texture resolutions. Selecting a lower resolution GPU texture may help improve app performance by reducing GPU load and lowering memory bandwidth requirements. However, selecting a lower GPU texture resolution is not guaranteed to improve performance in all cases or on all devices.

Using camera config filters in Unity


This guide is written assuming you have already installed and configured Unity with the ARCore SDK for Unity 1.11.0 or later. If not, see the Unity Quickstart for Android.

Configuring the camera and camera filters in your scene

To configure the camera config in an ARCore Unity project:

  1. Open the HelloAR sample, or open an existing project to follow along with your existing Unity ARCore project.

  2. Select the ARCore Device GameObject in your scene hierarchy.

  3. In the Inspector, double-click the instance of CameraConfigFilter (called DefaultCameraConfigFilter in the sample). Note that all four options are checked by default.

    • To set Target Camera Framerate settings:

      • To target the highest capture frame rate supported by the device, make sure both Target FPS30 and Target FPS60 are checked. The camera capture rate will target 60 fps on devices that support it, and automatically fall back to 30 fps if not. (This is the default setting.)

      • To limit the camera capture rate to 30 fps, check Target FPS30 by itself.

    • To set Depth Sensor Usage settings:

      • To use a depth sensor if the device has it, check both Do Not Use and Require and Use. (This is the default setting.)

      • To prevent ARCore from using a depth sensor regardless of whether the device has it, check Do Not Use, and uncheck Require and Use.

Choosing a specific camera config from the available configs

By default, the ARCore SDK for Unity selects the first available configuration. You can customize the selection logic by implementing and registering your own OnChooseCameraConfigurationDelegate.

public void Awake()
    // Register a custom selection function for the callback.

// Define the new callback function.
private int _OnChooseCameraConfigurationDelegate(
    List<CameraConfig> supportedConfigurations)
    // Look through supported camera configurations, and return the
    // index that you want (using 0 as an example).
    return 0;