Skip to content

Commit a9057d2

Browse files
authored
Merge branch 'master' into undo-moved-from
2 parents ebccfb4 + 0e2908e commit a9057d2

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

com.unity.perception/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Semantic Segmentation Labeler now places data in folders with randomized filenam
7575

7676
The uniform toggle on Categorical Parameters will now reset the Parameter's probability weights to be uniform.
7777

78+
Reorganized Perception MonoBehaviour paths within the AddComponentMenu.
79+
7880
### Deprecated
7981

8082
### Removed

com.unity.perception/Runtime/GroundTruth/Labelers/InstanceSegmentationLabeler.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,17 @@ void OnRenderedObjectInfosCalculated(int frame, NativeArray<RenderedObjectInfo>
117117
}
118118
}
119119

120-
void OnImageCaptured(int frame, NativeArray<Color32> data, RenderTexture renderTexture)
120+
void OnImageCaptured(int frameCount, NativeArray<Color32> data, RenderTexture renderTexture)
121121
{
122+
if (!m_AsyncAnnotations.ContainsKey(frameCount))
123+
return;
124+
122125
using (s_OnImageReceivedCallback.Auto())
123126
{
124127
m_CurrentTexture = renderTexture;
125128

126-
m_InstancePath = $"{k_Directory}/{k_FilePrefix}{frame}.png";
127-
var localPath = $"{Manager.Instance.GetDirectoryFor(k_Directory)}/{k_FilePrefix}{frame}.png";
129+
m_InstancePath = $"{k_Directory}/{k_FilePrefix}{frameCount}.png";
130+
var localPath = $"{Manager.Instance.GetDirectoryFor(k_Directory)}/{k_FilePrefix}{frameCount}.png";
128131

129132
var colors = new NativeArray<Color32>(data, Allocator.TempJob);
130133

com.unity.perception/Runtime/GroundTruth/Labelers/JointLabel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace UnityEngine.Perception.GroundTruth
88
/// Label to designate a custom joint/keypoint. These are needed to add body
99
/// parts to a humanoid model that are not contained in its <see cref="Animator"/> <see cref="Avatar"/>
1010
/// </summary>
11+
[AddComponentMenu("Perception/Labeling/Joint Label")]
1112
public class JointLabel : MonoBehaviour
1213
{
1314
/// <summary>

com.unity.perception/Runtime/GroundTruth/Labeling/Labeling.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace UnityEngine.Perception.GroundTruth
88
/// <summary>
99
/// Defines a set of labels associated with the object and its descendants. A Labeling component will override any Labeling components on the object's ancestors.
1010
/// </summary>
11+
[AddComponentMenu("Perception/Labeling/Labeling")]
1112
public class Labeling : MonoBehaviour
1213
{
1314
/// <summary>

com.unity.perception/Runtime/Randomization/Scenarios/FixedLengthScenario.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace UnityEngine.Perception.Randomization.Scenarios
55
/// <summary>
66
/// A scenario that runs for a fixed number of frames during each iteration
77
/// </summary>
8-
[AddComponentMenu("Perception/Randomization/Scenarios/Fixed Length Scenario")]
8+
[AddComponentMenu("Perception/Scenarios/Fixed Length Scenario")]
99
public class FixedLengthScenario: UnitySimulationScenario<FixedLengthScenario.Constants>
1010
{
1111
/// <summary>

0 commit comments

Comments
 (0)