Struct AsyncMetric | Perception | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct AsyncMetric

    Handle to a metric whose values may be reported in a subsequent frame.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.Perception.GroundTruth
    Syntax
    public struct AsyncMetric

    Fields

    MetricDefinition

    The MetricDefinition associated with this AsyncMetric.

    Declaration
    public readonly MetricDefinition MetricDefinition
    Field Value
    Type Description
    MetricDefinition

    Properties

    IsNil

    Returns true if the AsyncMetric is its default value.

    Declaration
    public bool IsNil { get; }
    Property Value
    Type Description
    Boolean

    IsPending

    True if ReportValues has not been called yet.

    Declaration
    public bool IsPending { get; }
    Property Value
    Type Description
    Boolean

    IsValid

    True if the simulation is still running.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    Methods

    ReportValues(String)

    Report the values for this AsyncMetric. Calling this method will transition IsPending to false. ReportValues may only be called once per AsyncMetric.

    Declaration
    public void ReportValues(string valuesJsonArray)
    Parameters
    Type Name Description
    String valuesJsonArray

    A JSON array in string form.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if values is null

    ReportValues<T>(T[])

    Report the values for this AsyncMetric. Calling this method will transition IsPending to false. ReportValues may only be called once per AsyncMetric.

    Declaration
    public void ReportValues<T>(T[] values)
    Parameters
    Type Name Description
    T[] values

    The values to report for the metric. These values will be converted to json.

    Type Parameters
    Name Description
    T

    The type of the values

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if values is null

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023