浏览代码

fix for visualization flag not being read at the correct time

This was causing the object count labeler to error out in datamaker, when visualization was enabled on the perception camera.
/addressables-test
Mohsen Kamalzadeh 3 年前
当前提交
ffba8c5e
共有 1 个文件被更改,包括 2 次插入9 次删除
  1. 11
      com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs

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


internal void InternalCleanup() => Cleanup();
internal void InternalVisualize() => OnVisualize();
private bool m_ShowVisualizations = false;
bool m_ShowVisualizations;
/// <summary>
/// Turns on/off the labeler's realtime visualization capability. If a labeler does not support realtime
/// visualization (<see cref="supportsVisualization"/>) or visualization is not enabled on the PerceptionCamera

{
get
{
return supportsVisualization && m_ShowVisualizations;
}
get => !supportsVisualization || !perceptionCamera || perceptionCamera.showVisualizations;
set
{
if (!supportsVisualization) return;

m_ShowVisualizations = value;
OnVisualizerEnabledChanged(m_ShowVisualizations);
}
}

sensorHandle = newPerceptionCamera.SensorHandle;
Setup();
isInitialized = true;
m_ShowVisualizations = supportsVisualization && perceptionCamera.showVisualizations;
}
catch (Exception)
{

正在加载...
取消
保存