docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ReportMetric

    ReportMetric<T>(MetricDefinition, T[])

    Report a metric regarding this sensor in the current frame.

    Declaration
    public void ReportMetric<T>(MetricDefinition metricDefinition, T[] values)
    Parameters
    Type Name Description
    MetricDefinition metricDefinition

    The MetricDefinition of the metric.

    T[] values

    An array to be converted to json and put in the "values" field of the metric

    Type Parameters
    Name Description
    T

    The value type

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if values is null

    InvalidOperationException

    Thrown if ShouldCaptureThisFrame is false.

    ReportMetric(MetricDefinition, string)

    Report a metric regarding this sensor in the current frame.

    Declaration
    public void ReportMetric(MetricDefinition metricDefinition, string valuesJsonArray)
    Parameters
    Type Name Description
    MetricDefinition metricDefinition

    The MetricDefinition of the metric.

    string valuesJsonArray

    A string-based JSON array to be placed in the "values" field of the metric

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if values is null

    InvalidOperationException

    Thrown if ShouldCaptureThisFrame is false.

    In This Article
    Back to top
    Copyright © 2024 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)