docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ITimedDataBuffer

    Represents a buffer of data samples ordered by the FrameTime of each sample.

    Namespace: Unity.LiveCapture
    Assembly: Unity.LiveCapture.dll
    Syntax
    public interface ITimedDataBuffer

    Properties

    Capacity

    The maximum number of elements which can be stored in the collection.

    Declaration
    int Capacity { get; set; }
    Property Value
    Type Description
    int
    Remarks

    If the new size is smaller than the current Count, elements will be truncated from the front.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the capacity is not greater than zero.

    Count

    The number of elements stored in the buffer.

    Declaration
    int Count { get; }
    Property Value
    Type Description
    int

    FrameRate

    The frame rate of the buffered samples.

    Declaration
    FrameRate FrameRate { get; set; }
    Property Value
    Type Description
    FrameRate
    Remarks

    This will remap the frame time of all samples in the buffer to match the new frame rate.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if attempting to set an invalid value.

    Methods

    Clear()

    Removes all samples in the buffer.

    Declaration
    void Clear()

    GetStatus(FrameTime)

    Retrieves the status of the buffer at the specified time.

    Declaration
    TimedSampleStatus GetStatus(FrameTime frameTime)
    Parameters
    Type Name Description
    FrameTime frameTime

    The time to retrieve the status for, expressed relative to the FrameRate.

    Returns
    Type Description
    TimedSampleStatus

    The status of the retrieved sample.

    TryGetBufferRange(out FrameTime, out FrameTime)

    Gets the frame time of the newest and oldest samples in the buffer.

    Declaration
    bool TryGetBufferRange(out FrameTime oldestSample, out FrameTime newestSample)
    Parameters
    Type Name Description
    FrameTime oldestSample

    The frame time of the oldest sample in the buffer, or default if there are no samples in the buffer.

    FrameTime newestSample

    The frame time of the newest sample in the buffer, or default if there are no samples in the buffer.

    Returns
    Type Description
    bool

    true if there are any samples in the buffer; otherwise, false.

    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)