docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DataRecorder

    Records data from an MR session

    Inheritance
    object
    DataRecorder
    CameraPoseRecorder
    FaceTrackingRecorder
    FacialExpressionsRecorder
    PlaneFindingRecorder
    PointCloudRecorder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MARS.Data.Recorded
    Assembly: Unity.MARS.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public abstract class DataRecorder

    Properties

    IsRecording

    Declaration
    public bool IsRecording { get; }
    Property Value
    Type Description
    bool

    TimeFromStart

    Time since the start of recording

    Declaration
    protected float TimeFromStart { get; }
    Property Value
    Type Description
    float

    Methods

    CancelRecording()

    If recording, stops recording data

    Declaration
    public void CancelRecording()

    FinalizeRecording()

    Records any last data if needed before tear down

    Declaration
    protected virtual void FinalizeRecording()

    Setup()

    Setup upon the start of recording

    Declaration
    protected virtual void Setup()

    TearDown()

    Tear down upon the end of recording. MR data is not guaranteed to exist upon tear down, so this method should not record any data.

    Declaration
    protected virtual void TearDown()

    ToggleRecording()

    If not recording, starts recording data. If recording, records any last data if needed and then stops recording data.

    Declaration
    public void ToggleRecording()

    TryCreateDataRecording(TimelineAsset, List<Object>)

    Try to add recorded data to a Timeline and create an object that references this recorded data

    Declaration
    public abstract DataRecording TryCreateDataRecording(TimelineAsset timeline, List<Object> newAssets)
    Parameters
    Type Name Description
    TimelineAsset timeline

    The Timeline that holds recorded data

    List<Object> newAssets

    List to be filled out with newly created Assets other than the Data Recording

    Returns
    Type Description
    DataRecording

    Object that references Timeline data for the recording, or null if creation fails

    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)