docs.unity.cn
    Show / Hide Table of Contents

    Struct TimeData

    Encapsulates state to measure a World's simulation time.

    Namespace: Unity.Core
    Syntax
    public readonly struct TimeData
    Remarks

    This data is most frequently read using Time. It is updated every frame by UpdateWorldTimeSystem. To temporarily override the time values, use SetTime(TimeData) or PushTime(TimeData).

    Constructors

    Name Description
    TimeData(Double, Single)

    Create a new TimeData struct with the given values.

    Fields

    Name Description
    DeltaTime

    The time in seconds since the last time-updating event occurred. (For example, a frame.)

    ElapsedTime

    The total cumulative elapsed time in seconds.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023