Class SceneHierarchyNode
A SceneHierarchyNode defines the parent-child relationship for a single labeled GameObject.
Implements
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Labelers
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public sealed class SceneHierarchyNode : IMessageProducer
Properties
childrenInstanceIds
The instance id of the labeled parent GameObject (if it exists)
Declaration
public HashSet<uint> childrenInstanceIds { get; }
Property Value
Type | Description |
---|---|
HashSet<uint> |
labels
The labels on the Labeling component of the labeled GameObject.
Declaration
public List<string> labels { get; }
Property Value
Type | Description |
---|---|
List<string> |
nodeInstanceId
The instance id of a labeled GameObject
Declaration
public uint nodeInstanceId { get; }
Property Value
Type | Description |
---|---|
uint |
parentInstanceId
A list of instance ids of labeled children GameObject
Declaration
public uint? parentInstanceId { get; }
Property Value
Type | Description |
---|---|
uint? |
Methods
ToMessage(IMessageBuilder)
Generates result message
Declaration
public void ToMessage(IMessageBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IMessageBuilder | builder |
TryGetParentInstanceId(out uint)
Safely gets the parent of this node (if it exists).
Declaration
public bool TryGetParentInstanceId(out uint parentsInstanceId)
Parameters
Type | Name | Description |
---|---|---|
uint | parentsInstanceId | The instance id of the parent if it exists. If the parent does not exist, this value will be set to uint MaxValue |
Returns
Type | Description |
---|---|
bool | A boolean indicating whether a parent exists for the current node |