浏览代码

added output dir shortcut to perception camera inspector

/main
Mohsen Kamalzadeh 4 年前
当前提交
dd7472af
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 20
      com.unity.perception/Editor/GroundTruth/PerceptionCameraEditor.cs
  2. 4
      com.unity.perception/Runtime/GroundTruth/SimulationState.cs

20
com.unity.perception/Editor/GroundTruth/PerceptionCameraEditor.cs


//EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(PerceptionCamera.labelers)));
m_LabelersList.DoLayoutList();
}
var dir = PlayerPrefs.GetString(SimulationState.latestOutputDirectoryKey, string.Empty);
if (dir != string.Empty)
{
EditorGUILayout.LabelField("Latest Output Folder:");
GUILayout.BeginVertical("TextArea");
EditorGUILayout.HelpBox(dir, MessageType.None);
GUILayout.BeginHorizontal();
if (GUILayout.Button("Show Folder"))
{
EditorUtility.RevealInFinder(dir);
}
if (GUILayout.Button("Copy Path"))
{
GUIUtility.systemCopyBuffer = dir;
}
GUILayout.EndHorizontal();
GUILayout.EndVertical();
}
if (EditorSettings.asyncShaderCompilation)
{
EditorGUILayout.HelpBox("Asynchronous shader compilation may result in invalid data in beginning frames. " +

4
com.unity.perception/Runtime/GroundTruth/SimulationState.cs


float m_LastTimeScale;
readonly string m_OutputDirectoryName;
string m_OutputDirectoryPath;
public const string latestOutputDirectoryKey = "latestOutputDirectory";
JsonSerializer m_AnnotationSerializer;
public bool IsRunning { get; private set; }

m_AnnotationSerializer.Converters.Add(new Vector3Converter());
m_AnnotationSerializer.Converters.Add(new QuaternionConverter());
m_OutputDirectoryName = outputDirectory;
PlayerPrefs.SetString(latestOutputDirectoryKey, Manager.Instance.GetDirectoryFor("",""));
IsRunning = true;
}

正在加载...
取消
保存