docs.unity3d.com
    Show / Hide Table of Contents

    Class LabelEntryMatchCache

    Cache of instance id -> label entry index for a LabelConfig. This is not well optimized and is the source of a known memory leak for apps that create new instances frequently.

    Inheritance
    Object
    LabelEntryMatchCache
    Namespace: UnityEngine.Perception.GroundTruth
    Syntax
    public class LabelEntryMatchCache : object, IGroundTruthGenerator, IDisposable

    Methods

    Dispose()

    Declaration
    public void Dispose()

    TryGetLabelEntryFromInstanceId(UInt32, out IdLabelEntry, out Int32)

    Retrieves the label entry for the given instance id.

    Declaration
    public bool TryGetLabelEntryFromInstanceId(uint instanceId, out IdLabelEntry labelEntry, out int index)
    Parameters
    Type Name Description
    UInt32 instanceId

    The instance id to look up

    IdLabelEntry labelEntry

    The IdLabelEntry of the match if found. Otherwise returns

    default(IdlabelEntry)
    .
    Int32 index

    The index of the matched IdLabelEntry in the IdLabelConfig if found. Otherwise returns -1.

    Returns
    Type Description
    Boolean

    True if a the instance id was found in the cache.

    Explicit Interface Implementations

    IGroundTruthGenerator.ClearMaterialProperties(MaterialPropertyBlock, Renderer, Labeling, UInt32)

    Disables ground truth generation for a Labeling component or its associated . This function is called by LabelManager when a Labeling component is disabled.

    Declaration
    void IGroundTruthGenerator.ClearMaterialProperties(MaterialPropertyBlock mpb, Renderer renderer, Labeling labeling, uint instanceId)
    Parameters
    Type Name Description
    MaterialPropertyBlock mpb

    The for the given . Can be used to set properties for custom rendering.

    Renderer renderer

    The under the given LabelManager.

    Labeling labeling

    The LabelManager component for which ground-truth generation should stop.

    UInt32 instanceId

    The instanceId assigned to the given LabelManager instance.

    Implements
    IGroundTruthGenerator.ClearMaterialProperties(MaterialPropertyBlock, Renderer, Labeling, UInt32)

    IGroundTruthGenerator.SetupMaterialProperties(MaterialPropertyBlock, Renderer, Labeling, UInt32)

    Enables ground truth generation for a Labeling component or its associated . This function is called by LabelManager when a Labeling component is registered, created, or enabled.

    Declaration
    void IGroundTruthGenerator.SetupMaterialProperties(MaterialPropertyBlock mpb, Renderer renderer, Labeling labeling, uint instanceId)
    Parameters
    Type Name Description
    MaterialPropertyBlock mpb

    The for the given . Can be used to set properties for custom rendering.

    Renderer renderer

    The under the given LabelManager.

    Labeling labeling

    The LabelManager component that was registered, created, or enabled

    UInt32 instanceId

    The instanceId assigned to the given LabelManager instance.

    Implements
    IGroundTruthGenerator.SetupMaterialProperties(MaterialPropertyBlock, Renderer, Labeling, UInt32)
    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