浏览代码

Update visual UI to use IMGUI system (#56)

* Update visual UI to use IMGUI system

Rework of visualization to use IMGUI system, allows for UI rendering to occur after all labelers execute.

* Fix visualization off check

* Fix for segmentation images responding to screen size changes

* Adjustments for PR requests. Fixed tests in HDRP.

* Move get uniqueLabelerId to public to fix editor tests

* Changed HUD to just use the labeler as the key

* Display no labeler enabled message

If perception is ran with show visualizations on and no labelers active, a message box will display saying that no labelers are currently active
/main
GitHub 4 年前
当前提交
c8cdf9d8
共有 32 个文件被更改,包括 560 次插入3035 次删除
  1. 89
      com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBoxLabeler.cs
  2. 77
      com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs
  3. 25
      com.unity.perception/Runtime/GroundTruth/Labelers/ObjectCountLabeler.cs
  4. 27
      com.unity.perception/Runtime/GroundTruth/Labelers/RenderedObjectInfoLabeler.cs
  5. 99
      com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentationLabeler.cs
  6. 167
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/HUDPanel.cs
  7. 149
      com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs
  8. 141
      com.unity.perception/Tests/Runtime/GroundTruthTests/VisualizationTests.cs
  9. 4
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/solid_white.png
  10. 104
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/solid_white.png.meta
  11. 8
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Shaders.meta
  12. 171
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/BoundingBoxPrefab.prefab
  13. 7
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/BoundingBoxPrefab.prefab.meta
  14. 598
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericSlider.prefab
  15. 7
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericSlider.prefab.meta
  16. 335
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericToggle.prefab
  17. 7
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericToggle.prefab.meta
  18. 287
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/KeyValuePanel.prefab
  19. 7
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/KeyValuePanel.prefab.meta
  20. 1001
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/VisualizationUI.prefab
  21. 7
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/VisualizationUI.prefab.meta
  22. 125
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/ControlPanel.cs
  23. 11
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/ControlPanel.cs.meta
  24. 41
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/KeyValuePanel.cs
  25. 11
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/KeyValuePanel.cs.meta
  26. 79
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/VisualizationCanvas.cs
  27. 11
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/VisualizationCanvas.cs.meta
  28. 0
      /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Shaders/SegRemoveBackgroundShader.shader.meta
  29. 0
      /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Shaders/SegRemoveBackgroundShader.shader
  30. 0
      /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/outline_box.png
  31. 0
      /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/outline_box.png.meta

89
com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBoxLabeler.cs


AnnotationDefinition m_BoundingBoxAnnotationDefinition;
BoundingBoxValue[] m_BoundingBoxValues;
private GameObject visualizationHolder = null;
Vector2 m_OriginalScreenSize = Vector2.zero;
private Vector2 originalScreenSize = Vector2.zero;
Texture m_BoundingBoxTexture;
Texture m_LabelTexture;
GUIStyle m_Style;
/// <summary>
/// Creates a new BoundingBox2DLabeler. Be sure to assign <see cref="idLabelConfig"/> before adding to a <see cref="PerceptionCamera"/>.

// Record the original screen size. The screen size can change during play, and the visual bounding
// boxes need to be scaled appropriately
originalScreenSize = new Vector2(Screen.width, Screen.height);
m_OriginalScreenSize = new Vector2(Screen.width, Screen.height);
m_BoundingBoxTexture = Resources.Load<Texture>("outline_box");
m_LabelTexture = Resources.Load<Texture>("solid_white");
m_Style = new GUIStyle();
m_Style.normal.textColor = Color.black;
m_Style.fontSize = 16;
m_Style.padding = new RectOffset(4, 4, 4, 4);
m_Style.contentOffset = new Vector2(4, 0);
m_Style.alignment = TextAnchor.MiddleLeft;
}
/// <inheritdoc/>

if (!CaptureOptions.useAsyncReadbackIfSupported && frameCount != Time.frameCount)
Debug.LogWarning("Not on current frame: " + frameCount + "(" + Time.frameCount + ")");
if (visualizationEnabled)
{
Visualize();
}
asyncAnnotation.ReportValues(m_BoundingBoxValues);
}

protected override void PopulateVisualizationPanel(ControlPanel panel)
{
panel.AddToggleControl("BoundingBoxes", enabled => {
visualizationEnabled = enabled;
});
objectPool = new List<GameObject>();
visualizationHolder = new GameObject("BoundsHolder" + Time.frameCount);
visualizationCanvas.AddComponent(visualizationHolder);
}
void ClearObjectPool(int count)
protected override void OnVisualize()
for (int i = count; i < objectPool.Count; i++)
{
objectPool[i].SetActive(false);
}
}
if (m_BoundingBoxValues == null) return;
List<GameObject> objectPool = null;
void Visualize()
{
ClearObjectPool(m_BoundingBoxValues.Length);
GUI.depth = 5;
float screenRatioWidth = Screen.width / originalScreenSize.x;
float screenRatioHeight = Screen.height / originalScreenSize.y;
float screenRatioWidth = Screen.width / m_OriginalScreenSize.x;
float screenRatioHeight = Screen.height / m_OriginalScreenSize.y;
for (int i = 0; i < m_BoundingBoxValues.Length; i++)
foreach (var box in m_BoundingBoxValues)
var boxVal = m_BoundingBoxValues[i];
if (i >= objectPool.Count)
{
var boundingBoxObject = GameObject.Instantiate(Resources.Load<GameObject>("BoundingBoxPrefab"));
objectPool.Add(boundingBoxObject);
var rectTransform = (RectTransform)boundingBoxObject.transform;
rectTransform.SetParent(visualizationHolder.transform, false);
}
if (!objectPool[i].activeSelf) objectPool[i].SetActive(true);
string label = boxVal.label_name + "_" + boxVal.instance_id;
objectPool[i].GetComponentInChildren<Text>().text = label;
float x = box.x * screenRatioWidth;
float y = box.y * screenRatioHeight;
var rectTrans = objectPool[i].transform as RectTransform;
rectTrans.anchoredPosition = new Vector2(boxVal.x * screenRatioWidth, -boxVal.y * screenRatioHeight);
rectTrans.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, boxVal.width * screenRatioWidth);
rectTrans.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, boxVal.height * screenRatioHeight);
var boxRect = new Rect(x, y, box.width * screenRatioWidth, box.height * screenRatioHeight);
var labelWidth = Math.Min(120, box.width * screenRatioWidth);
var labelRect = new Rect(x, y - 17, labelWidth, 17);
GUI.DrawTexture(boxRect, m_BoundingBoxTexture, ScaleMode.StretchToFill, true, 0, Color.yellow, 3, 0.25f);
GUI.DrawTexture(labelRect, m_LabelTexture, ScaleMode.StretchToFill, true, 0, Color.yellow, 0, 0);
GUI.Label(labelRect, box.label_name + "_" + box.instance_id, m_Style);
}
/// <inheritdoc/>
override protected void OnVisualizerEnabledChanged(bool enabled)
{
if (visualizationHolder != null)
visualizationHolder.SetActive(enabled);
}
}
}

77
com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs


using Unity.Simulation;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using UnityEngine.UIElements;
namespace UnityEngine.Perception.GroundTruth
{

}
/// <summary>
/// Retrieve a handle to the visualization canvas <see cref="VisualizationCanvas"/>. This is the specific canvas that all visualization
/// labelers should be added to. The canvas has helper functions to create many common visualization components.
/// </summary>
public VisualizationCanvas visualizationCanvas { get; private set; }
/// <summary>
/// The control panel that is attached to the visualization canvas. The common location to add interactive controls.
/// </summary>
public ControlPanel controlPanel => visualizationCanvas != null ? visualizationCanvas.controlPanel : null;
/// <summary>
public HUDPanel hudPanel => visualizationCanvas != null ? visualizationCanvas.hudPanel : null;
public HUDPanel hudPanel => perceptionCamera != null ? perceptionCamera.hudPanel : null;
/// <summary>
/// The <see cref="PerceptionCamera"/> that contains this labeler.

/// to initialize state.
/// </summary>
protected virtual void Setup() { }
/// <summary>
/// Called immediately after <see cref="setup"/>. Implement this to initialize labeler's visualization
/// capability if one exists <see cref="supportVisualization"/>.
/// </summary>
/// <param name="panel">The target control panel for the labeler's visualization component</param>
protected virtual void PopulateVisualizationPanel(ControlPanel panel) { }
/// <param name="enabled">The current enabled state of the visualizer</param>
protected virtual void OnVisualizerEnabledChanged(bool enabled) {}
/// <param name="visualizerEnabled">The current enabled state of the visualizer</param>
protected virtual void OnVisualizerEnabledChanged(bool visualizerEnabled) {}
/// <summary>
/// Called during the Update each frame the the labeler is enabled and <see cref="SensorHandle.ShouldCaptureThisFrame"/> is true.
/// </summary>

/// </summary>
protected virtual void OnBeginRendering() {}
/// <summary>
/// Labeling pass to display labeler's visualization components, if applicable. Important note, all labeler's visualizations need
/// to use Unity's Immediate Mode GUI (IMGUI) <see cref="https://docs.unity3d.com/Manual/GUIScriptingGuide.html"/> system.
/// This called is triggered from <see cref="perceptionCamera.OnGUI"/> call. This call happens immediately before <see cref="OnVisualizeAdditionalUI"/>
/// so that the visualization components are drawn below the UI elements.
/// </summary>
protected virtual void OnVisualize() {}
/// <summary>
/// In this pass, a labeler can add custom GUI controls to the scene. Important note, all labeler's additional
/// GUIs need to use Unity's Immediate Mode GUI (IMGUI) <see cref="https://docs.unity3d.com/Manual/GUIScriptingGuide.html"/> system.
/// This called is triggered from <see cref="perceptionCamera.OnGUI"/> call. This call happens immediately after the <see cref="OnVisualize"/>
/// so that the visualization components are drawn below the UI elements.
/// </summary>
protected virtual void OnVisualizeAdditionalUI() {}
/// <summary>
/// Called when the Labeler is about to be destroyed or removed from the PerceptionCamera. Use this to clean up to state.

internal void InternalSetup() => Setup();
internal void InternalPopulateVisualizationPanel(GameObject panel) => PopulateVisualizationPanel(controlPanel);
internal bool InternalVisualizationEnabled
{

internal void InternalOnUpdate() => OnUpdate();
internal void InternalOnBeginRendering() => OnBeginRendering();
internal void InternalCleanup() => Cleanup();
internal void InternalVisualize() => OnVisualize();
private bool m_ShowVisualizations = false;

/// this will not function.
/// </summary>
protected bool visualizationEnabled
internal bool visualizationEnabled
{
get
{

{
if (!supportsVisualization) return;
if (visualizationCanvas == null) return;
if (value != m_ShowVisualizations)
{

}
}
internal void Init(PerceptionCamera newPerceptionCamera, VisualizationCanvas visualizationCanvas)
internal void VisualizeUI()
{
if (supportsVisualization)
{
GUILayout.Label(GetType().Name);
GUILayout.BeginHorizontal();
GUILayout.Space(10);
GUILayout.Label("Enabled");
GUILayout.FlexibleSpace();
visualizationEnabled = GUILayout.Toggle(visualizationEnabled, "");
GUILayout.EndHorizontal();
if (visualizationEnabled) OnVisualizeAdditionalUI();
}
}
internal void Visualize()
{
if (visualizationEnabled) OnVisualize();
}
internal void Init(PerceptionCamera newPerceptionCamera)
this.visualizationCanvas = visualizationCanvas;
if (supportsVisualization && visualizationCanvas != null)
{
m_ShowVisualizations = true;
InitVisualizationUI();
}
m_ShowVisualizations = supportsVisualization && perceptionCamera.showVisualizations;
}
catch (Exception)
{

}
private void InitVisualizationUI()
{
PopulateVisualizationPanel(controlPanel);
}
}
}

25
com.unity.perception/Runtime/GroundTruth/Labelers/ObjectCountLabeler.cs


Dictionary<int, AsyncMetric> m_ObjectCountAsyncMetrics;
MetricDefinition m_ObjectCountMetricDefinition;
List<string> vizEntries = null;
/// <summary>
/// Creates a new ObjectCountLabeler. This constructor should only be used by serialization. For creation from
/// user code, use <see cref="ObjectCountLabeler(IdLabelConfig)"/>.

m_ClassCountValues = new ClassCountValue[entries.Count];
bool visualize = visualizationEnabled;
if (visualize && vizEntries == null)
{
vizEntries = new List<string>();
}
for (var i = 0; i < entries.Count; i++)
{

if (visualize)
{
var label = entries[i].label + " Counts";
hudPanel.UpdateEntry(this, label, counts[i].ToString());
hudPanel.UpdateEntry(label, counts[i].ToString());
vizEntries.Add(label);
}
}

/// <inheritdoc/>
protected override void PopulateVisualizationPanel(ControlPanel panel)
protected override void OnVisualizerEnabledChanged(bool enabled)
panel.AddToggleControl("Object Counts", enabled => { visualizationEnabled = enabled; });
}
/// <inheritdoc/>
override protected void OnVisualizerEnabledChanged(bool enabled)
{
if (!enabled)
{
hudPanel.RemoveEntries(vizEntries);
vizEntries.Clear();
}
if (enabled) return;
hudPanel.RemoveEntries(this);
}
}
}

27
com.unity.perception/Runtime/GroundTruth/Labelers/RenderedObjectInfoLabeler.cs


Dictionary<int, AsyncMetric> m_ObjectInfoAsyncMetrics;
MetricDefinition m_RenderedObjectInfoMetricDefinition;
List<string> vizEntries = null;
/// <summary>
/// Creates a new RenderedObjectInfoLabeler. Be sure to assign <see cref="idLabelConfig"/> before adding to a <see cref="PerceptionCamera"/>.
/// </summary>

m_VisiblePixelsValues = new RenderedObjectInfoValue[renderedObjectInfos.Length];
bool visualize = visualizationEnabled;
if (visualize && vizEntries == null)
{
vizEntries = new List<string>();
}
for (var i = 0; i < renderedObjectInfos.Length; i++)
{

if (visualize)
{
var label = labelEntry.label + "_" + objectInfo.instanceId;
hudPanel.UpdateEntry(label, objectInfo.pixelCount.ToString());
vizEntries.Add(label);
hudPanel.UpdateEntry(this, label, objectInfo.pixelCount.ToString());
}
}

bool TryGetLabelEntryFromInstanceId(uint instanceId, out IdLabelEntry labelEntry)
{

/// <inheritdoc/>
protected override void PopulateVisualizationPanel(ControlPanel panel)
protected override void OnVisualizerEnabledChanged(bool enabled)
panel.AddToggleControl("Pixel Counts", enabled => { visualizationEnabled = enabled; });
}
/// <inheritdoc/>
override protected void OnVisualizerEnabledChanged(bool enabled)
{
if (!enabled)
{
hudPanel.RemoveEntries(vizEntries);
vizEntries.Clear();
}
if (enabled) return;
hudPanel.RemoveEntries(this);
}
}
}

99
com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentationLabeler.cs


Dictionary<int, AsyncAnnotation> m_AsyncAnnotations;
private float defaultSegmentTransparency = 0.8f;
private float defaultBackgroundTransparency = 0.0f;
private float segmentTransparency = 0.8f;
private float backgroundTransparency = 0.0f;
/// <summary>
/// Creates a new SemanticSegmentationLabeler. Be sure to assign <see cref="labelConfig"/> before adding to a <see cref="PerceptionCamera"/>.

int camWidth = 0;
int camHeight = 0;
private GameObject segCanvas;
GUIStyle labelStyle = null;
GUIStyle sliderStyle = null;
/// <inheritdoc/>
protected override bool supportsVisualization => true;

visualizationEnabled = supportsVisualization;
}
private void SetupVisualizationElements()
{
segmentTransparency = 0.8f;
backgroundTransparency = 0.0f;
segVisual = GameObject.Instantiate(Resources.Load<GameObject>("SegmentTexture"));
segImage = segVisual.GetComponent<RawImage>();
segImage.material.SetFloat("_SegmentTransparency", segmentTransparency);
segImage.material.SetFloat("_BackTransparency", backgroundTransparency);
segImage.texture = targetTexture;
var rt = segVisual.transform as RectTransform;
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, camWidth);
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, camHeight);
if (segCanvas == null)
{
segCanvas = new GameObject(perceptionCamera.gameObject.name + "_segmentation_canvas");
segCanvas.AddComponent<RectTransform>();
var canvas = segCanvas.AddComponent<Canvas>();
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
segCanvas.AddComponent<CanvasScaler>();
segVisual.transform.SetParent(segCanvas.transform, false);
}
labelStyle = new GUIStyle(GUI.skin.label) {padding = {left = 10}};
sliderStyle = new GUIStyle(GUI.skin.horizontalSlider) {margin = {left = 12}};
}
void OnSemanticSegmentationImageRead(int frameCount, NativeArray<Color32> data)
{
if (!m_AsyncAnnotations.TryGetValue(frameCount, out var annotation))

m_SemanticSegmentationTextureReader?.Dispose();
m_SemanticSegmentationTextureReader = null;
Object.Destroy(segCanvas);
segCanvas = null;
if (m_TargetTextureOverride != null)
m_TargetTextureOverride.Release();

/// <inheritdoc/>
protected override void PopulateVisualizationPanel(ControlPanel panel)
override protected void OnVisualizerEnabledChanged(bool enabled)
panel.AddToggleControl("Segmentation Information", enabled => { visualizationEnabled = enabled; });
if (segVisual != null)
segVisual.SetActive(enabled);
}
defaultSegmentTransparency = 0.8f;
defaultBackgroundTransparency = 0.0f;
panel.AddSliderControl("Object Alpha", defaultSegmentTransparency, val => {
if (segImage != null) segImage.material.SetFloat("_SegmentTransparency", val);
});
panel.AddSliderControl("Background Alpha", defaultBackgroundTransparency, val => {
if (segImage != null) segImage.material.SetFloat("_BackTransparency", val);
});
/// <inheritdoc/>
protected override void OnVisualizeAdditionalUI()
{
if (segImage == null)
{
SetupVisualizationElements();
}
segVisual = GameObject.Instantiate(Resources.Load<GameObject>("SegmentTexture"));
var rt = segVisual.transform as RectTransform;
if (rt != null && camHeight != Screen.height)
{
camHeight = Screen.height;
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, camHeight);
}
segImage = segVisual.GetComponent<RawImage>();
segImage.material.SetFloat("_SegmentTransparency", defaultSegmentTransparency);
segImage.material.SetFloat("_BackTransparency", defaultBackgroundTransparency);
segImage.texture = targetTexture;
if (rt != null && camWidth != Screen.width)
{
camWidth = Screen.width;
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, Screen.width);
}
RectTransform rt = segVisual.transform as RectTransform;
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, camWidth);
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, camHeight);
GUILayout.Space(4);
GUILayout.Label("Object Alpha:", labelStyle);
segmentTransparency = GUILayout.HorizontalSlider(segmentTransparency, 0.0f, 1.0f, sliderStyle, GUI.skin.horizontalSliderThumb);
GUILayout.Space(4);
GUILayout.Label("Background Alpha:", labelStyle);
backgroundTransparency = GUILayout.HorizontalSlider(backgroundTransparency, 0.0f, 1.0f, sliderStyle, GUI.skin.horizontalSliderThumb);
GUI.skin.label.padding.left = 0;
visualizationCanvas.AddComponent(segVisual, setAsLowestElement: true);
}
if (!GUI.changed) return;
segImage.material.SetFloat("_SegmentTransparency", segmentTransparency);
segImage.material.SetFloat("_BackTransparency", backgroundTransparency);
/// <inheritdoc/>
override protected void OnVisualizerEnabledChanged(bool enabled)
{
if (segVisual != null)
segVisual.SetActive(enabled);
}
}
}

167
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/HUDPanel.cs


using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// </summary>
public class HUDPanel : MonoBehaviour
{
Dictionary<string, (bool, KeyValuePanel)> entries = new Dictionary<string, (bool, KeyValuePanel)>();
Stack<KeyValuePanel> orphans = new Stack<KeyValuePanel>();
readonly Dictionary<CameraLabeler, Dictionary<string, string>> m_Entries = new Dictionary<CameraLabeler, Dictionary<string, string>>();
/// <summary>
/// The panel that will hold all of the key value panel elements, this reference is needed to be able to hide the panel
/// </summary>
public GameObject contentPanel = null;
/// <summary>
/// The scroll rect of the HUD panel, this reference is needed to be able to hide the panel
/// </summary>
public ScrollRect scrollRect = null;
/// <summary>
/// The background image of the HUD panel, this reference is needed to be able to hide the panel
/// </summary>
public Image img = null;
GUIStyle m_KeyStyle;
GUIStyle m_ValueStyle;
void Update()
const int k_LineHeight = 22;
const int k_XPadding = 10;
const int k_YPadding = 10;
const int k_BoxWidth = 200;
const int k_YLineSpacing = 4;
public int entryCount => m_Entries.Keys.Count();
void Awake()
if (entries.Any() != scrollRect.enabled)
m_KeyStyle = new GUIStyle
scrollRect.enabled = !scrollRect.enabled;
img.enabled = scrollRect.enabled;
foreach (var i in GetComponentsInChildren<Image>())
{
i.enabled = scrollRect.enabled;
}
}
alignment = TextAnchor.MiddleLeft,
padding = new RectOffset(10, 10, 5, 5),
normal = {textColor = Color.white}
};
// Go through everyone that has not been updated and remove them and
// if they have been updated mark them dirty for next round
var keys = new List<string>(entries.Keys);
foreach (var key in keys)
m_ValueStyle = new GUIStyle
var entry = entries[key];
if (!entry.Item1)
{
entry.Item2.gameObject.SetActive(false);
orphans.Push(entry.Item2);
}
else
{
entry.Item1 = false;
entries[key] = entry;
}
}
alignment = TextAnchor.MiddleRight,
padding = new RectOffset(10, 10, 5, 5),
normal = {textColor = Color.white}
};
/// <param name="labeler">The labeler that requested the HUD entry</param>
public void UpdateEntry(string key, string value)
public void UpdateEntry(CameraLabeler labeler, string key, string value)
{
if (!m_Entries.ContainsKey(labeler))
{
m_Entries[labeler] = new Dictionary<string, string>();
}
m_Entries[labeler][key] = value;
}
Vector2 m_ScrollPosition;
bool m_GUIStylesInitialized = false;
void SetUpGUIStyles()
{
GUI.skin.label.fontSize = 12;
GUI.skin.label.font = Resources.Load<Font>("Inter-Light");
GUI.skin.label.padding = new RectOffset(0, 0, 1, 1);
GUI.skin.label.margin = new RectOffset(0, 0, 1, 1);
GUI.skin.box.padding = new RectOffset(5, 5, 5, 5);
GUI.skin.toggle.margin = new RectOffset(0, 0, 0, 0);
GUI.skin.horizontalSlider.margin = new RectOffset(0, 0, 0, 0);
m_GUIStylesInitialized = true;
}
int EntriesCount()
{
return m_Entries.Count + m_Entries.Sum(entry => entry.Value.Count);
}
internal void OnDrawGUI()
(bool, KeyValuePanel) val;
if (m_Entries.Count == 0) return;
if (!entries.ContainsKey(key))
if (!m_GUIStylesInitialized) SetUpGUIStyles();
GUI.depth = 0; // Draw HUD objects on the top of other UI objects
var height = Math.Min(k_LineHeight * EntriesCount(), Screen.height * 0.5f - k_YPadding * 2);
var xPos = Screen.width - k_BoxWidth - k_XPadding;
var yPos = Screen.height - height - k_YPadding;
GUILayout.BeginArea(new Rect(xPos, yPos, k_BoxWidth, height), GUI.skin.box);
m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition);
var firstTime = true;
foreach (var labeler in m_Entries.Keys)
if (orphans.Any())
if (!firstTime) GUILayout.Space(k_YLineSpacing);
firstTime = false;
GUILayout.Label(labeler.GetType().Name);
foreach (var entry in m_Entries[labeler])
val = (true, orphans.Pop());
val.Item2.gameObject.SetActive(true);
GUILayout.BeginHorizontal();
GUILayout.Space(5);
GUILayout.Label(entry.Key);
GUILayout.FlexibleSpace();
GUILayout.Label(entry.Value);
GUILayout.EndHorizontal();
else
{
val = (true, GameObject.Instantiate(Resources.Load<GameObject>("KeyValuePanel")).GetComponent<KeyValuePanel>());
val.Item2.transform.SetParent(contentPanel.transform, false);
}
val.Item2.SetKey(key);
}
else
{
val = entries[key];
val.Item1 = true;
val.Item2.SetValue(value);
entries[key] = val;
GUILayout.EndScrollView();
GUILayout.EndArea();
/// <param name="labeler">The labeler that requested the removal</param>
public void RemoveEntry(string key)
public void RemoveEntry(CameraLabeler labeler, string key)
if (entries.ContainsKey(key))
if (m_Entries.ContainsKey(labeler))
var entry = entries[key];
entry.Item2.gameObject.SetActive(false);
entries.Remove(key);
orphans.Push(entry.Item2);
m_Entries[labeler].Remove(key);
}
}

/// <param name="keys">List of keys to remove from the panel</param>
public void RemoveEntries(List<string> keys)
{
foreach (var k in keys) RemoveEntry(k);
}
/// <summary>
/// Removes all of the passed in entries from the HUD
/// </summary>
/// <param name="keys">List of keys t remove from the panel</param>
public void RemoveEntries(string[] keys)
/// <param name="labeler">The labeler that requested the removal</param>
public void RemoveEntries(CameraLabeler labeler)
foreach (var k in keys) RemoveEntry(k);
m_Entries.Remove(labeler);
}
}
}

149
com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs


#pragma warning restore 414
static PerceptionCamera s_VisualizedPerceptionCamera;
static GameObject s_VisualizationCamera;
static GameObject s_VisualizationCanvas;
/// <summary>
/// Turns on/off the realtime visualization capability.

passes.Add(pass);
}
#endif
VisualizationCanvas visualizationCanvas => m_ShowingVisualizations ? s_VisualizationCanvas.GetComponent<VisualizationCanvas>() : null;
/// <summary>
/// Add a data object which will be added to the dataset with each capture. Overrides existing sensor data associated with the given key.

RenderPipelineManager.endCameraRendering += CheckForRendererFeature;
}
void Start()
{
var cam = GetComponent<Camera>();
cam.enabled = false;
}
internal HUDPanel hudPanel = null;
void SetupVisualizationCamera(Camera cam)
{

m_ShowingVisualizations = true;
s_VisualizedPerceptionCamera = this;
// set up to render to a render texture instead of the screen
var visualizationRenderTexture = new RenderTexture(cam.pixelWidth, cam.pixelHeight, 8, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
visualizationRenderTexture.name = cam.name + "_visualization_texture";
cam.targetTexture = visualizationRenderTexture;
s_VisualizationCamera = new GameObject(cam.name + "_VisualizationCamera");
var visualizationCameraComponent = s_VisualizationCamera.AddComponent<Camera>();
int layerMask = 1 << LayerMask.NameToLayer("UI");
visualizationCameraComponent.orthographic = true;
visualizationCameraComponent.cullingMask = layerMask;
s_VisualizationCanvas = GameObject.Instantiate(Resources.Load<GameObject>("VisualizationUI"));
s_VisualizationCanvas.name = cam.name + "_VisualizationCanvas";
var canvas = s_VisualizationCanvas.GetComponent<Canvas>();
canvas.renderMode = RenderMode.ScreenSpaceCamera;
canvas.worldCamera = visualizationCameraComponent;
var imgObj = new GameObject(cam.name + "_Image");
var img = imgObj.AddComponent<RawImage>();
img.texture = visualizationRenderTexture;
var rect = imgObj.transform as RectTransform;
rect.SetParent(s_VisualizationCanvas.transform, false);
//ensure the rgb image is rendered in the back
rect.SetAsFirstSibling();
rect.anchorMin = new Vector2(0, 0);
rect.anchorMax = new Vector2(1, 1);
rect.pivot = new Vector2(0.5f, 0.5f);
rect.offsetMax = Vector2.zero;
rect.offsetMin = Vector2.zero;
hudPanel = gameObject.AddComponent<HUDPanel>();
}
void CheckForRendererFeature(ScriptableRenderContext context, Camera camera)

if (!SensorHandle.IsValid)
return;
var cam = GetComponent<Camera>(); // TODO I don't like this... Get the camera handle, we should have it
cam.enabled = SensorHandle.ShouldCaptureThisFrame;
bool anyVisualizing = false;
foreach (var labeler in m_Labelers)
{

if (!labeler.isInitialized)
{
labeler.Init(this, visualizationCanvas);
labeler.Init(this);
}
labeler.InternalOnUpdate();

// Currently there is an issue in the perception camera that causes the UI layer not to be visualized
// if we are utilizing async readback and we have to flip our captured image. We have created a jira
// issue for this (aisv-779) and have notified the engine team about this.
anyVisualizing = true;
void LateUpdate()
private Vector2 scrollPosition;
private const float panelWidth = 200;
private const float panelHeight = 250;
private void SetUpGUIStyles()
{
GUI.skin.label.fontSize = 12;
GUI.skin.label.font = Resources.Load<Font>("Inter-Light");
GUI.skin.label.padding = new RectOffset(0, 0, 1, 1);
GUI.skin.label.margin = new RectOffset(0, 0, 1, 1);
GUI.skin.box.padding = new RectOffset(5, 5, 5, 5);
GUI.skin.toggle.margin = new RectOffset(0, 0, 0, 0);
GUI.skin.horizontalSlider.margin = new RectOffset(0, 0, 0, 0);
m_GUIStylesInitialized = true;
}
private bool m_GUIStylesInitialized = false;
private void DisplayNoLabelersMessage()
{
var x = Screen.width - panelWidth - 10;
var height = Math.Min(Screen.height * 0.5f - 20, 90);
GUILayout.BeginArea(new Rect(x, 10, panelWidth, height), GUI.skin.box);
GUILayout.Label("Visualization: No labelers are currently active. Enable at least one labeler from the inspector window of your perception camera to see visualizations.");
// If a labeler has never been initialized then it was off from the
// start, it should not be called to draw on the UI
foreach (var labeler in m_Labelers.Where(labeler => labeler.isInitialized))
{
labeler.VisualizeUI();
GUILayout.Space(4);
}
GUILayout.EndArea();
}
private void OnGUI()
var cam = GetComponent<Camera>();
if (showVisualizations)
if (!m_ShowingVisualizations) return;
if (!m_GUIStylesInitialized) SetUpGUIStyles();
GUI.depth = 5;
var anyLabelerEnabled = false;
// If a labeler has never been initialized then it was off from the
// start, it should not be called to draw on the UI
foreach (var labeler in m_Labelers.Where(labeler => labeler.isInitialized))
cam.enabled = false;
if (SensorHandle.ShouldCaptureThisFrame) cam.Render();
labeler.Visualize();
anyLabelerEnabled = true;
else
cam.enabled = SensorHandle.ShouldCaptureThisFrame;
if (!anyLabelerEnabled)
{
DisplayNoLabelersMessage();
return;
}
GUI.depth = 0;
hudPanel.OnDrawGUI();
var x = Screen.width - panelWidth - 10;
var height = Math.Min(Screen.height * 0.5f - 20, panelHeight);
GUILayout.BeginArea(new Rect(x, 10, panelWidth, height), GUI.skin.box);
scrollPosition = GUILayout.BeginScrollView(scrollPosition);
// If a labeler has never been initialized then it was off from the
// start, it should not be called to draw on the UI
foreach (var labeler in m_Labelers.Where(labeler => labeler.isInitialized))
{
labeler.VisualizeUI();
GUILayout.Space(4);
}
GUILayout.EndScrollView();
GUILayout.EndArea();
}
void OnValidate()

}
};
CaptureCamera.Capture(cam, colorFunctor, flipY: ShouldFlipY(cam));
CaptureCamera.Capture(cam, colorFunctor, flipY: flipY);
Profiler.EndSample();
}

{
#if HDRP_PRESENT
var hdAdditionalCameraData = GetComponent<HDAdditionalCameraData>();

continue;
if (!labeler.isInitialized)
labeler.Init(this, visualizationCanvas);
labeler.Init(this);
labeler.InternalOnBeginRendering();
}

{
if (s_VisualizedPerceptionCamera == this)
{
Destroy(s_VisualizationCamera);
Destroy(s_VisualizationCanvas);
s_VisualizationCamera = null;
s_VisualizationCanvas = null;
}
}

141
com.unity.perception/Tests/Runtime/GroundTruthTests/VisualizationTests.cs


using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Collections;
#if HDRP_PRESENT
using UnityEngine.Rendering.HighDefinition;
#endif
using Object = UnityEngine.Object;
namespace GroundTruthTests
{

[Test]
public void VisualizedCamera_SetsUpCanvasAndSecondCamera()
GameObject SetupCameraSemanticSegmentation(string name)
var object1 = new GameObject();
object1.name = nameof(VisualizedCamera_SetsUpCanvasAndSecondCamera);
var object1 = new GameObject(name);
#if HDRP_PRESENT
var hdAdditionalCameraData = object1.AddComponent<HDAdditionalCameraData>();
#endif
var labelConfig = ScriptableObject.CreateInstance<SemanticSegmentationLabelConfig>();
labelConfig.Init(new List<SemanticSegmentationLabelEntry>()
{
new SemanticSegmentationLabelEntry()
{
label = "label",
color = new Color32(10, 20, 30, System.Byte.MaxValue)
}
});
var semanticSegmentationLabeler = new SemanticSegmentationLabeler(labelConfig);
perceptionCamera1.AddLabeler(semanticSegmentationLabeler);
return object1;
}
[UnityTest]
public IEnumerator VisualizedCamera_SetsUpCanvas()
{
var object1 = SetupCameraSemanticSegmentation(nameof(VisualizedCamera_SetsUpCanvas));
Assert.IsNotNull(camera.targetTexture);
Assert.IsNotNull(GameObject.Find(nameof(VisualizedCamera_SetsUpCanvasAndSecondCamera) + "_VisualizationCamera"));
Assert.IsNotNull(GameObject.Find(nameof(VisualizedCamera_SetsUpCanvasAndSecondCamera) + "_VisualizationCanvas"));
// Need to wait to make sure a visualization call is made so that the canvas will be constructed
yield return null;
Assert.IsNotNull(GameObject.Find(nameof(VisualizedCamera_SetsUpCanvas) + "_segmentation_canvas"));
}
[Test]
public void TwoCamerasVisualizing_CausesWarningAndDisablesVisualization()

[UnityTest]
public IEnumerator DestroyCamera_RemovesVisualization()
{
var object1 = new GameObject();
object1.name = nameof(DestroyCamera_RemovesVisualization);
object1.SetActive(false);
object1.AddComponent<Camera>();
var perceptionCamera1 = object1.AddComponent<PerceptionCamera>();
perceptionCamera1.showVisualizations = true;
var object1 = SetupCameraSemanticSegmentation(nameof(DestroyCamera_RemovesVisualization));
Assert.IsNotNull(GameObject.Find(nameof(DestroyCamera_RemovesVisualization) + "_VisualizationCamera"));
//wait a frame to make sure visualize is called once
yield return null;
Assert.IsNotNull(GameObject.Find(nameof(DestroyCamera_RemovesVisualization) + "_segmentation_canvas"));
Assert.IsNull(GameObject.Find(nameof(DestroyCamera_RemovesVisualization) + "_VisualizationCamera"));
Assert.IsNull(GameObject.Find(nameof(DestroyCamera_RemovesVisualization) + "_segmentation_canvas"));
[Test]
public void DestroyAndRecreateCamera_ProperlyVisualizes()
[UnityTest]
public IEnumerator DestroyAndRecreateCamera_ProperlyVisualizes()
var object1 = new GameObject();
object1.name = nameof(DestroyAndRecreateCamera_ProperlyVisualizes);
object1.SetActive(false);
object1.AddComponent<Camera>();
var perceptionCamera1 = object1.AddComponent<PerceptionCamera>();
perceptionCamera1.showVisualizations = true;
var object1 = SetupCameraSemanticSegmentation(nameof(DestroyAndRecreateCamera_ProperlyVisualizes));
//wait a frame to make sure visualize is called once
yield return null;
var object2 = new GameObject();
object2.name = nameof(DestroyAndRecreateCamera_ProperlyVisualizes) + "2";
object2.SetActive(false);
var camera2 = object2.AddComponent<Camera>();
var perceptionCamera2 = object2.AddComponent<PerceptionCamera>();
perceptionCamera2.showVisualizations = true;
var object2 = SetupCameraSemanticSegmentation(nameof(DestroyAndRecreateCamera_ProperlyVisualizes) + "2");
Assert.IsNotNull(camera2.targetTexture);
Assert.IsNotNull(GameObject.Find(nameof(DestroyAndRecreateCamera_ProperlyVisualizes) + "2_VisualizationCamera"));
//wait a frame to make sure visualize is called once
yield return null;
Assert.IsNotNull(GameObject.Find(nameof(DestroyAndRecreateCamera_ProperlyVisualizes) + "2_segmentation_canvas"));
}
[UnityTest]
public IEnumerator TwoLabelersOfSameType_ProperlyStoredInHud()
{
var label = "label";
var planeObject = TestHelper.CreateLabeledPlane(.1f, label);
AddTestObjectForCleanup(planeObject);
var object1 = new GameObject("PerceptionCamera");
object1.SetActive(false);
object1.AddComponent<Camera>();
var perceptionCamera = object1.AddComponent<PerceptionCamera>();
perceptionCamera.showVisualizations = true;
#if HDRP_PRESENT
var hdAdditionalCameraData = object1.AddComponent<HDAdditionalCameraData>();
#endif
var cfg = ScriptableObject.CreateInstance<IdLabelConfig>();
cfg.Init(new List<IdLabelEntry>
{
new IdLabelEntry
{
id = 1,
label = label
}
});
var labeler1 = new ObjectCountLabeler(cfg);
labeler1.objectCountMetricId = "a1da3c27-369d-4929-aea6-d01614635ce2";
var labeler2 = new ObjectCountLabeler(cfg);
labeler1.objectCountMetricId = "b1da3c27-369d-4929-aea6-d01614635ce2";
perceptionCamera.AddLabeler(labeler1);
perceptionCamera.AddLabeler(labeler2);
object1.SetActive(true);
AddTestObjectForCleanup(object1);
//wait a couple of frames to make sure visualize has been called
yield return null;
yield return null;
Assert.AreEqual(perceptionCamera.hudPanel.entryCount, 2);
labeler2.visualizationEnabled = false;
yield return null;
Assert.AreEqual(perceptionCamera.hudPanel.entryCount, 1);
}
}
}

4
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/solid_white.png

之前 之后
宽度: 30  |  高度: 30  |  大小: 573 B

104
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/solid_white.png.meta


fileFormatVersion: 2
guid: bc6ed62c29e144961bc6ac55cc87f418
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 1, y: 1, z: 1, w: 1}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

8
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Shaders.meta


fileFormatVersion: 2
guid: 49685106b663d4ce2be106a7decb44fa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

171
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/BoundingBoxPrefab.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1633194878988975384
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4870595019017500996}
- component: {fileID: 364050011935639306}
- component: {fileID: 7218880252870594959}
m_Layer: 5
m_Name: BoundingBoxPrefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4870595019017500996
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1633194878988975384}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8991206466818883376}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0, y: 1}
--- !u!222 &364050011935639306
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1633194878988975384}
m_CullTransparentMesh: 0
--- !u!114 &7218880252870594959
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1633194878988975384}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9529412, g: 0.33562368, b: 0.12941174, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 44b5bee1ec2ca43c092ad21cd29748a8, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7937696831727727488
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8991206466818883376}
- component: {fileID: 5224755520443495957}
- component: {fileID: 521312507235122078}
- component: {fileID: 6983286864234823325}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8991206466818883376
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7937696831727727488}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 4870595019017500996}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 5, y: -5}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!222 &5224755520443495957
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7937696831727727488}
m_CullTransparentMesh: 0
--- !u!114 &521312507235122078
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7937696831727727488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9529412, g: 0.33562368, b: 0.12941174, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 397721830eb764bbc8cd9fecf3ab1290, type: 3}
m_FontSize: 32
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: Object
--- !u!114 &6983286864234823325
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7937696831727727488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 3, y: -3}
m_UseGraphicAlpha: 1

7
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/BoundingBoxPrefab.prefab.meta


fileFormatVersion: 2
guid: 85501d694004a4f33a1f56553c9b2b92
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

598
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericSlider.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6374784292818490195
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784292818490194}
m_Layer: 5
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784292818490194
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784292818490195}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6374784293898242116}
m_Father: {fileID: 6374784293047607865}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &6374784293047607862
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784293047607865}
- component: {fileID: 6374784293047607867}
- component: {fileID: 6374784293047607864}
m_Layer: 5
m_Name: Slider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784293047607865
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293047607862}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6374784293886523806}
- {fileID: 6374784292818490194}
- {fileID: 6374784294464427910}
m_Father: {fileID: 6374784293342824938}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 12}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6374784293047607867
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293047607862}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6374784293723858456}
m_FillRect: {fileID: 6374784293898242116}
m_HandleRect: {fileID: 6374784293723858457}
m_Direction: 0
m_MinValue: 0
m_MaxValue: 1
m_WholeNumbers: 0
m_Value: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &6374784293047607864
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293047607862}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 4
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &6374784293342824939
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784293342824938}
- component: {fileID: 6374784293342824943}
- component: {fileID: 6374784293342824940}
- component: {fileID: 6374784293342824941}
m_Layer: 5
m_Name: GenericSlider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784293342824938
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293342824939}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6374784294729382760}
- {fileID: 6374784293047607865}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6374784293342824943
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293342824939}
m_CullTransparentMesh: 0
--- !u!114 &6374784293342824940
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293342824939}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &6374784293342824941
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293342824939}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 15
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 3
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 1
m_ChildScaleHeight: 0
--- !u!1 &6374784293723858454
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784293723858457}
- component: {fileID: 6374784293723858459}
- component: {fileID: 6374784293723858456}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784293723858457
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293723858454}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6374784294464427910}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 12, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6374784293723858459
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293723858454}
m_CullTransparentMesh: 0
--- !u!114 &6374784293723858456
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293723858454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6374784293886523807
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784293886523806}
- component: {fileID: 6374784293886523776}
- component: {fileID: 6374784293886523777}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784293886523806
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293886523807}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6374784293047607865}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6374784293886523776
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293886523807}
m_CullTransparentMesh: 0
--- !u!114 &6374784293886523777
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293886523807}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6374784293898242117
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784293898242116}
- component: {fileID: 6374784293898242118}
- component: {fileID: 6374784293898242119}
m_Layer: 5
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784293898242116
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293898242117}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6374784292818490194}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6374784293898242118
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293898242117}
m_CullTransparentMesh: 0
--- !u!114 &6374784293898242119
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784293898242117}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6374784294464427911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784294464427910}
m_Layer: 5
m_Name: Handle Slide Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784294464427910
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784294464427911}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6374784293723858457}
m_Father: {fileID: 6374784293047607865}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -12, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &6374784294729382761
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374784294729382760}
- component: {fileID: 6374784294729382765}
- component: {fileID: 6374784294729382762}
- component: {fileID: 6374784294729382763}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6374784294729382760
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784294729382761}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children: []
m_Father: {fileID: 6374784293342824938}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 30}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &6374784294729382765
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784294729382761}
m_CullTransparentMesh: 0
--- !u!114 &6374784294729382762
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784294729382761}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 397721830eb764bbc8cd9fecf3ab1290, type: 3}
m_FontSize: 24
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Generic Slider
--- !u!114 &6374784294729382763
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6374784294729382761}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1

7
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericSlider.prefab.meta


fileFormatVersion: 2
guid: 5cdb99a397fb6487590b21a044f8ffcd
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

335
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericToggle.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5620663266170330011
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5620663266170330008}
- component: {fileID: 5620663266170330014}
- component: {fileID: 5620663266170330009}
m_Layer: 5
m_Name: Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5620663266170330008
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266170330011}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children: []
m_Father: {fileID: 5620663266272600928}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -33, y: -0.5}
m_SizeDelta: {x: 14, y: -3}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5620663266170330014
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266170330011}
m_CullTransparentMesh: 0
--- !u!114 &5620663266170330009
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266170330011}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 397721830eb764bbc8cd9fecf3ab1290, type: 3}
m_FontSize: 24
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: Generic Toggle
--- !u!1 &5620663266272600931
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5620663266272600928}
- component: {fileID: 5620663266272600934}
- component: {fileID: 5620663266272600929}
m_Layer: 5
m_Name: GenericToggle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5620663266272600928
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266272600931}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5620663266814857893}
- {fileID: 5620663266170330008}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5620663266272600934
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266272600931}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5620663266814857818}
toggleTransition: 1
graphic: {fileID: 5620663266748790646}
m_Group: {fileID: 0}
onValueChanged:
m_PersistentCalls:
m_Calls: []
m_IsOn: 1
--- !u!114 &5620663266272600929
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266272600931}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 160
m_PreferredHeight: 20
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &5620663266748790640
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5620663266748790641}
- component: {fileID: 5620663266748790647}
- component: {fileID: 5620663266748790646}
m_Layer: 5
m_Name: Checkmark
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5620663266748790641
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266748790640}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5620663266814857893}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 14, y: 14}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5620663266748790647
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266748790640}
m_CullTransparentMesh: 0
--- !u!114 &5620663266748790646
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266748790640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 331e953e4177743c6a5ff16884a97dcf, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5620663266814857892
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5620663266814857893}
- component: {fileID: 5620663266814857819}
- component: {fileID: 5620663266814857818}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5620663266814857893
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266814857892}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5620663266748790641}
m_Father: {fileID: 5620663266272600928}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 16}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &5620663266814857819
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266814857892}
m_CullTransparentMesh: 0
--- !u!114 &5620663266814857818
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5620663266814857892}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.16470589, g: 0.16470589, b: 0.16470589, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

7
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/GenericToggle.prefab.meta


fileFormatVersion: 2
guid: 4dc80013d4f184e83a0d8c3da1a05417
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

287
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/KeyValuePanel.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3284129489564578195
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4595725647490753358}
- component: {fileID: 4496511663627014910}
- component: {fileID: 6034931589588613035}
- component: {fileID: 7049261054784314162}
m_Layer: 5
m_Name: Value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4595725647490753358
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3284129489564578195}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 5547799090381645220}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &4496511663627014910
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3284129489564578195}
m_CullTransparentMesh: 0
--- !u!114 &6034931589588613035
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3284129489564578195}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.7264151, g: 0.70928264, b: 0.70928264, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 397721830eb764bbc8cd9fecf3ab1290, type: 3}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: VALUE
--- !u!114 &7049261054784314162
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3284129489564578195}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &5085956214946841210
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 924712682360615393}
- component: {fileID: 7386780920487943076}
- component: {fileID: 1894703116479988963}
- component: {fileID: 6489701985588846927}
m_Layer: 5
m_Name: Key
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &924712682360615393
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5085956214946841210}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 5547799090381645220}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &7386780920487943076
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5085956214946841210}
m_CullTransparentMesh: 0
--- !u!114 &1894703116479988963
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5085956214946841210}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.7264151, g: 0.70928264, b: 0.70928264, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 397721830eb764bbc8cd9fecf3ab1290, type: 3}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 'KEY:'
--- !u!114 &6489701985588846927
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5085956214946841210}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 4
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &9007962583023748487
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5547799090381645220}
- component: {fileID: 8878022795811502189}
- component: {fileID: 5555615362143100286}
- component: {fileID: 8848784309261800470}
m_Layer: 5
m_Name: KeyValuePanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5547799090381645220
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9007962583023748487}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 924712682360615393}
- {fileID: 4595725647490753358}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!222 &8878022795811502189
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9007962583023748487}
m_CullTransparentMesh: 0
--- !u!114 &5555615362143100286
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9007962583023748487}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
--- !u!114 &8848784309261800470
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9007962583023748487}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8ffbc2d71e7b74cdc803e4d76cff5db4, type: 3}
m_Name:
m_EditorClassIdentifier:
key: {fileID: 1894703116479988963}
value: {fileID: 6034931589588613035}

7
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/KeyValuePanel.prefab.meta


fileFormatVersion: 2
guid: 86c6e42ad096b4b8e8853c8d00f6adbc
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/VisualizationUI.prefab
文件差异内容过多而无法显示
查看文件

7
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/VisualizationUI.prefab.meta


fileFormatVersion: 2
guid: 5d7678e45cbe34953884861e62372b0d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

125
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/ControlPanel.cs


using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
namespace UnityEngine.Perception.GroundTruth
{
/// <summary>
/// The control panel for labeler visualizers. This panel resides in the upper right hand corner of
/// the display. Any UI element can be added to the panel, but it contains helper methods to quickly
/// create some of the most common control panel display elements: toggles and sliders.
/// </summary>
public class ControlPanel : MonoBehaviour
{
HashSet<GameObject> m_Controls = new HashSet<GameObject>();
/// <summary>
/// Retrieves a list of the current controls in the control panel.
/// </summary>
public IEnumerable<GameObject> controls => m_Controls;
/// <summary>
/// Adds a new UI control to the control panel. If the control cannot be added and the method will
/// return false. Also, all UI elements must have a LayoutElement component and if they do not,
/// this method will reject the new element, and return false.
/// </summary>
/// <param name="uiControl">The control that is to be added to the control panel</param>
/// <returns>True if the control could be added, false if it there was a problem adding it</returns>
public bool AddNewControl(GameObject uiControl)
{
if (uiControl.GetComponent<RectTransform>() == null)
{
Debug.LogError("Control panel UI control must have a rect transform component.");
return false;
}
if (uiControl.GetComponent<LayoutElement>() == null)
{
Debug.LogError("Control panel UI control must contain a layout element component.");
return false;
}
if (m_Controls.Add(uiControl))
{
uiControl.transform.SetParent(this.transform, false);
return true;
}
return false;
}
/// <summary>
/// Removes the passed in component from the control panel. Returns
/// false if the element does not exist. Returns true on a successful removal.
/// The caller is responsible for destroying the control.
/// </summary>
/// <param name="uiControl">The control that needs to be removed from the panel</param>
/// <returns>True if the control could be removed, false if there was an issue removing the control</returns>
public bool RemoveControl(GameObject uiControl)
{
if (m_Controls.Remove(uiControl))
{
uiControl.transform.SetParent(null);
return true;
}
return false;
}
/// <summary>
/// Creates a new toggle control with passed in name. The passed in listener will be
/// called on toggle clicks. If anything goes wrong this method will return null.
/// Returns the control panel element upon a successful add.
/// </summary>
/// <param name="name">The name of the toggle</param>
/// <param name="listener">The callback action that will be triggered when the toggle's state changes</param>
/// <returns>The created toggle</returns>
public GameObject AddToggleControl(string name, UnityAction<bool> listener)
{
if (listener == null)
{
Debug.LogWarning("Adding toggle to control panel without a listener, nothing will respond to user's clicks");
}
var toggle = GameObject.Instantiate(Resources.Load<GameObject>("GenericToggle"));
toggle.transform.SetParent(this.transform, false);
toggle.GetComponentInChildren<Text>().text = name;
toggle.GetComponent<Toggle>().onValueChanged.AddListener(listener);
m_Controls.Add(toggle);
return toggle;
}
/// <summary>
/// Creates a new slider control with the passed in name and default value. The slider's value runs from 0 to 1.
/// The passed in listener will be called on slider changes. If anything goes wrong this method will return null.
/// Returns the control panel element upon a successful add.
/// </summary>
/// <param name="name">The name of the slider control</param>
/// <param name="defaultValue">The default value of the slider, between 0 and 1</param>
/// <param name="listener">The callback action that will be triggered when the slider's value changes</param>
/// <returns>The created slider</returns>
public GameObject AddSliderControl(string name, float defaultValue, UnityAction<float> listener)
{
if (listener == null)
{
Debug.LogWarning("Adding slider to control panel without a listener, nothing will respond to user's interactions");
}
var gameObject = GameObject.Instantiate(Resources.Load<GameObject>("GenericSlider"));
gameObject.transform.SetParent(this.transform, false);
gameObject.GetComponentInChildren<Text>().text = name;
var slider = gameObject.GetComponentInChildren<Slider>();
slider.value = defaultValue;
slider.onValueChanged.AddListener(listener);
m_Controls.Add(gameObject);
return gameObject;
}
}
}

11
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/ControlPanel.cs.meta


fileFormatVersion: 2
guid: 6dbb75c37e45a4cf68053401d3cfd19d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

41
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/KeyValuePanel.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace UnityEngine.Perception.GroundTruth
{
/// <summary>
/// Key value pair panel UI object
/// </summary>
public class KeyValuePanel : MonoBehaviour
{
/// <summary>
/// Key UI text element of the panel
/// </summary>
public Text key = null;
/// <summary>
/// Value UI text element of the panel
/// </summary>
public Text value = null;
/// <summary>
/// Sets the key of this key value pair
/// </summary>
/// <param name="k">The key of the key/value pair</param>
public void SetKey(string k)
{
if (k == null || k == string.Empty) return;
key.text = k;
}
/// <summary>
/// Sets the value of this key value pair
/// </summary>
/// <param name="v">The value of the key/value pair</param>
public void SetValue(string v)
{
value.text = v;
}
}
}

11
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/KeyValuePanel.cs.meta


fileFormatVersion: 2
guid: 8ffbc2d71e7b74cdc803e4d76cff5db4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

79
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/VisualizationCanvas.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
namespace UnityEngine.Perception.GroundTruth
{
/// <summary>
/// The visualization canvas. This canvas should contain all labeler visualization components.
/// All visualizlation components should be added to this canvas via teh AddComponent method.
/// </summary>
public class VisualizationCanvas : MonoBehaviour
{
/// <summary>
/// The control panel contains the UI control elements used to interact with the labelers.
/// </summary>
public ControlPanel controlPanel;
/// <summary>
/// The HUD panel displays realtime key/value pair data on a UI panel.
/// </summary>
public HUDPanel hudPanel;
/// <summary>
/// Game object which acts as the scene container for all of the dynamic labeler visuals
/// </summary>
public GameObject dynaicContentHolder;
// Start is called before the first frame update
void Start()
{
if (GameObject.Find("EventSystem") == null)
{
var eventSystemGo = new GameObject("EventSystem");
eventSystemGo.AddComponent<UnityEngine.EventSystems.EventSystem>();
eventSystemGo.AddComponent<StandaloneInputModule>();
}
}
/// <summary>
/// Adds a new UI components to the visualization canvas. Pass in fullscreen if the component should take up
/// the entire screen. Pass in setAsLowestElement if the component should be rendered behind all other components.
/// This method will return false if the element could not be added, true if everything works properly.
/// </summary>
/// <param name="component">UI component that should be added to this UI canvas</param>
/// <param name="fullScreen">Should this component's rect transform be set to fill the entire dimensions of the parent, defaults to true</param>
/// <param name="setAsLowestElement">Should this UI component be rendered as the lowest UI component in the scene, defaults to false</param>
/// <returns>True if the component was added properly, false if an error occurred.</returns>
public bool AddComponent(GameObject component, bool fullScreen = true, bool setAsLowestElement = false)
{
if (component == null)
{
Debug.LogError("Trying to add a null component to VisualizationCanvas");
return false;
}
RectTransform trans = component.GetComponent<RectTransform>();
if (trans == null)
{
Debug.LogWarning("Adding UI element without a rect transform, adding one to it");
trans = component.AddComponent<RectTransform>();
}
if (fullScreen)
{
trans.anchorMin = new Vector2(0, 0);
trans.anchorMax = new Vector2(1, 1);
trans.pivot = new Vector2(0.5f, 0.5f);
trans.offsetMax = new Vector2(0, 0);
trans.offsetMin = new Vector2(0, 0);
}
trans.SetParent(dynaicContentHolder.transform, false);
if (setAsLowestElement) component.transform.SetAsFirstSibling();
return true;
}
}
}

11
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/VisualizationCanvas.cs.meta


fileFormatVersion: 2
guid: 168e7de4774334a4b8c17799f9fe0699
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

/com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/SegRemoveBackgroundShader.shader.meta → /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Shaders/SegRemoveBackgroundShader.shader.meta

/com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/SegRemoveBackgroundShader.shader → /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Shaders/SegRemoveBackgroundShader.shader

/com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Textures/outline_box.png → /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/outline_box.png

/com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Textures/outline_box.png.meta → /com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/outline_box.png.meta

正在加载...
取消
保存