docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    ARCore Session Recording

    Note: The session recording feature described below is currently only supported when the graphics rendering API is set to OpenGLES3. Attempting to play back a session recording through the ARCore playback APIs, when the graphics rendering API is set to Vulkan, will not succeed.

    ARCore allows you to record an ArSession to an .mp4 and play it back at a later time. To support this feature, the ARCoreSessionSubsystem exposes the following methods:

    • StartRecording
    • StopRecording
    • StartPlaybackUri
    • StopPlaybackUri

    To start a recording, supply an ArRecordingConfig. This specifies the file name that Unity saves the recording as, as well as other options. Call StopRecording to stop recording. When Unity stops recording, it creates the .mp4 file as specified in the ArRecordingConfig. This contains the camera feed and sensor data required by ARCore.

    To play back a video, use the StartPlaybackUri method, and specify an .mp4 file created during an earlier recording.

    Note: The file location string parameters, provided to the recording and playback APIs, must be in URI format. For example, referencing a file on the Android local file system requires escaping the path, and have the "file://" protocol prefix. For references related to file paths as URIs, there are articles available RFC-8089, and here.

    To start or stop a recorded file in ARCore, the ARCoreSessionSubsystem pauses the session. Pausing and resuming a session can take between 0.5 and 1.0 seconds.

    Note: Video recordings contain sensor data, but not the computed results. ARCore does not always produce the same output, which means trackables might not be consistent between playbacks of the same recording. For example, multiple playbacks of the same recording might give different plane detection results.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)