docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Sample

    Stores per-thread timing state for a named sample captured by ProfilerSamplingEvent.

    Inheritance
    object
    Sample
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    [Serializable]
    public class Sample

    Fields

    sampleValues

    The queue of elapsed-time measurements recorded since the last dispatch.

    Declaration
    [JsonIgnore]
    public Queue<double> sampleValues
    Field Value
    Type Description
    Queue<double>

    stopwatch

    The stopwatch used to measure elapsed time between BeginSample and EndSample.

    Declaration
    [JsonIgnore]
    public Stopwatch stopwatch
    Field Value
    Type Description
    Stopwatch

    threadID

    The managed thread ID of the thread that called BeginSample(string).

    Declaration
    [JsonIgnore]
    public int threadID
    Field Value
    Type Description
    int

    timeSinceStartup

    The value of Time.realtimeSinceStartup at the time this sample was last recorded.

    Declaration
    public float timeSinceStartup
    Field Value
    Type Description
    float

    value

    The most recent elapsed time in seconds for this sample.

    Declaration
    public double value
    Field Value
    Type Description
    double
    In This Article
    Back to top
    Copyright © 2026 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)