Configure an ARCore session with ARCore Extensions for Unity
Stay organized with collections
Save and categorize content based on your preferences.
Configure an ARCore session to build AR experiences for your app.
What is a session?
All AR processes, such as motion tracking,
environmental understanding, and lighting estimation, happen inside an ARCore
session. ARSession 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:
AR Foundation must be set up before you can use ARCore Extensions. See the
AR Foundation setup documentation
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 if you have not done so already.
Configure extension features in ARCoreExtensionsConfig
Create a new session configuration in ARCore.
In Unity, create a new session configuration by navigating to Assets >
Create > XR > ARCore Extensions Config.
The default configuration looks like this:
In the Hierarchy pane, select the ARCore Extensions
object.
In the Inspector pane's ARCore Extensions Config field,
click the target
button, and connect to the ARCoreExtensionsConfig
asset.
AR Session management
In AR Foundation 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
functions to destroy and create subsystems instead. See the AR Foundation
3.x to 4.x migration guide.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["An ARCore session manages all AR processes like motion tracking and environmental understanding, and is accessed through the `ARSession` object."],["Before configuring an ARCore session, ensure both AR Foundation and ARCore Extensions are properly set up in your Unity project."],["You can configure extension features within the ARCoreExtensionsConfig asset, which allows you to customize session behavior."],["Starting with AR Foundation 4.0, session management is handled through `LoaderUtility` functions instead of destroying the `ARSession` game object."],["After configuring your session, explore the provided quickstart guides for Android and iOS to begin building AR experiences with ARCore Extensions."]]],["An ARCore session is essential for AR processes like motion tracking and lighting estimation. `ARSession` manages the AR system state, including session creation and configuration, and enables access to camera images and device pose. Before configuring the ARCore session, AR Foundation and ARCore Extensions must be set up. You need to create an `ARCore Extensions Config` asset in Unity and connect it to the `ARCore Extensions` object. Session management is done using `LoaderUtility` functions in newer versions of AR Foundation.\n"]]