docs.unity3d.com
    Show / Hide Table of Contents

    Struct AnnotationHandle

    A handle to an annotation. Can be used to report metrics on the annotation.

    Namespace: UnityEngine.Perception.GroundTruth
    Syntax
    public readonly struct AnnotationHandle : IDatasetHandle, IEquatable<AnnotationHandle>

    Properties

    Id

    The ID of the annotation which will be used in the json metadata.

    Declaration
    public readonly string Id { get; }
    Property Value
    Type Description
    String
    Implements
    IDatasetHandle.Id

    IsNil

    Returns true if the annotation is nil (created using default instantiation).

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

    Methods

    Equals(Object)

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean

    Equals(AnnotationHandle)

    Declaration
    public readonly bool Equals(AnnotationHandle other)
    Parameters
    Type Name Description
    AnnotationHandle other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32

    IsValid()

    Declaration
    public readonly bool IsValid()
    Returns
    Type Description
    Boolean
    Implements
    IDatasetHandle.IsValid()

    ReportMetric(MetricDefinition, Metric)

    Synchronously report a metric for the current simulation frame.

    Declaration
    public readonly void ReportMetric(MetricDefinition definition, Metric metric)
    Parameters
    Type Name Description
    MetricDefinition definition

    The definition of the metric to report

    Metric metric

    The metric value

    ReportMetricAsync(MetricDefinition)

    Report a metric whose values will be supplied in a later frame.

    Declaration
    public readonly AsyncFuture<Metric> ReportMetricAsync(MetricDefinition metricDefinition)
    Parameters
    Type Name Description
    MetricDefinition metricDefinition

    The type of the metric.

    Returns
    Type Description
    AsyncFuture<Metric>

    A handle to an AsyncMetric, which can be used to report values for this metric in future frames.

    Back to top
    Terms of use
    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