ARCore Device prefab

Manages the ARCore session.

When active in the a scene, this prefab will create and initialize an ARCore session and render the background image from a Unity camera that follows the device's position and orientation as estimated by ARCore.

If the app does not have permission to access the camera when the prefab initializes, the permission will be requested from the user automatically.

Only one of these prefabs may be present in the scene at a time. Destroying the prefab will also, by default, destroy the session. To reuse the same session across different scenes, call DontDestroyOnLoad on the GameObject.

Prefab Hierarchy

Game object name Description

Holds the ARCoreSession component that is responsible for managing the ARCore session.

Holds the main camera for your 3D scene.

ARCore Device game object

Holds the ARCoreSession component that is responsible for managing the ARCore session.

Requires a valid ARCoreSessionConfig

Components: GoogleARCore.ARCoreSession, UnityEngine.Transform

First Person Camera game object

Holds the main camera for your 3D scene.

The attached TrackedPoseDriver component updates game object transform's local position and local rotation, to match the estimated camera pose.

The attached ARCoreBackgroundRenderer renders the physical device camera's sensor image as a background texture of the attached unity camera.

Components: GoogleARCore.ARCoreBackgroundRenderer, UnityEngine.Camera, UnityEngine.SpatialTracking.TrackedPoseDriver, UnityEngine.Transform

Send feedback about...