Class LabelManager
Manages the registration of Labeling components
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.LabelManagement
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public class LabelManager
Fields
instanceIds
The unique ids assigned to each registered labeled object. This list is updated each frame right before rendering starts.
Declaration
public NativeList<uint> instanceIds
Field Value
Type | Description |
---|---|
NativeList<uint> |
instanceSegmentationColors
The unique segmentation colors assigned to each registered labeled object. This list is updated each frame right before rendering starts.
Declaration
public NativeList<Color32> instanceSegmentationColors
Field Value
Type | Description |
---|---|
NativeList<Color32> |
Properties
registeredLabels
Returns the set of registered Labeling components
Declaration
public IEnumerable<Labeling> registeredLabels { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Labeling> |
singleton
Returns the active LabeledObjectsManager instance
Declaration
public static LabelManager singleton { get; }
Property Value
Type | Description |
---|---|
LabelManager |
Methods
Activate(IGroundTruthGenerator)
Activates the given IGroundTruthGenerator. SetupMaterialProperties(MaterialPropertyBlock, Renderer, Labeling, Material, uint) will be called for all MeshRenderer instances under each object containing a Labeling component.
Declaration
public void Activate(IGroundTruthGenerator generator)
Parameters
Type | Name | Description |
---|---|---|
IGroundTruthGenerator | generator | The generator to register |
Activate<T>()
Activates the given IGroundTruthGenerator. SetupMaterialProperties(MaterialPropertyBlock, Renderer, Labeling, Material, uint) will be called for all MeshRenderer instances under each object containing a Labeling component.
Declaration
public void Activate<T>() where T : IGroundTruthGenerator, new()
Type Parameters
Name | Description |
---|---|
T | The type of generator to add. |
Deactivate(IGroundTruthGenerator)
Deactivates the given IGroundTruthGenerator. It will no longer receive calls when Labeling instances are created.
Declaration
public bool Deactivate(IGroundTruthGenerator generator)
Parameters
Type | Name | Description |
---|---|---|
IGroundTruthGenerator | generator | The generator to deactivate |
Returns
Type | Description |
---|---|
bool | True if the generator was successfully removed. False if generator was not active. |
Deactivate<T>()
Deactivates the given type of IGroundTruthGenerator. It will no longer receive calls when Labeling instances are created.
Declaration
public void Deactivate<T>()
Type Parameters
Name | Description |
---|---|
T | The type of generator to remove. |
RegisterPendingLabels()
Registers all pending labels. Called once per frame during LateUpdate by the PerceptionUpdater.
Declaration
public void RegisterPendingLabels()