Configure an ARCore session to build AR experiences for your app.

## What is a session?

All [AR processes](https://developers.google.com/ar/discover/concepts), such as motion tracking,
environmental understanding, and lighting estimation, happen inside an ARCore
session. [`ARSession`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/api/UnityEngine.XR.ARFoundation.ARSession.html) is the main entry point to the ARCore
API. It manages the AR system state and handles the session lifecycle, allowing
the app to create, configure, start, or stop a session. Most importantly, it
enables the app to receive frames that allow access to the camera image and
device pose.

The session can be used to configure the following features:

- [Cloud Anchors](https://developers.google.com/ar/develop/cloud-anchors)
- [ARCore Geospatial API](https://developers.google.com/ar/develop/geospatial)

## Set up AR Foundation and ARCore Extensions

AR Foundation must be set up before you can use ARCore Extensions. See the
[AR Foundation setup documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/manual/index.html#scene-setup)
for instructions for setting up your AR scene.

ARCore Extensions must be set up before you can configure an ARCore session. See
the
[ARCore Extensions setup documentation](https://developers.google.com/ar/develop/unity-arf/getting-started-extensions#setup_arcore_extensions) if you have not done so already.

## Configure extension features in ARCoreExtensionsConfig

Create a new session configuration in ARCore.

1. In Unity, create a new session configuration by navigating to **Assets \>
   Create \> XR \> ARCore Extensions Config**.

   The default configuration looks like this:

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/unity-arf-default-session-config.png)
2. In the **Hierarchy** pane, select the **ARCore Extensions**
   object.

3. In the **Inspector** pane's **ARCore Extensions Config** field,
   click the target
   ![](https://developers.google.com/static/ar/develop/unity-arf/images/getting-started/inspector-target.png)
   button, and connect to the **ARCoreExtensionsConfig**
   asset.

## AR Session management

In [AR Foundation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual) 2.1
and 3.1 destroying the **ARSession** game object would destroy the underlying
ARCore session.

Starting with AR Foundation 4.0, you must use the
[`LoaderUtility`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.LoaderUtility.html)
functions to destroy and create subsystems instead. See the AR Foundation
[3.x to 4.x migration guide](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/manual/migration-guide-3.html).

- [`LoaderUtility.Deinitialize()`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.LoaderUtility.html#UnityEngine_XR_ARFoundation_LoaderUtility_Deinitialize)
- [`LoaderUtility.Initialize()`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.LoaderUtility.html#UnityEngine_XR_ARFoundation_LoaderUtility_Initialize)

## Next steps

- [Quickstart for ARCore Extensions for Android](https://developers.google.com/ar/develop/unity-arf/quickstart-android)
- [Quickstart for ARCore Extensions for iOS](https://developers.google.com/ar/develop/unity-arf/quickstart-ios)