Skip to content

Commit eaea105

Browse files
committed
some code cleanup, Leo's final words
1 parent b69b460 commit eaea105

File tree

2 files changed

+160
-137
lines changed

2 files changed

+160
-137
lines changed

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

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using UnityEditorInternal;
44
using UnityEngine;
55
using UnityEngine.Perception.GroundTruth;
6+
67
#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX
78
using UnityEditor.Perception.Visualizer;
89
#endif
@@ -159,13 +160,6 @@ public override void OnInspectorGUI()
159160
GUIUtility.systemCopyBuffer = dir;
160161
}
161162
GUILayout.EndHorizontal();
162-
#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX
163-
if (GUILayout.Button("Open Visualizer"))
164-
{
165-
var project = Application.dataPath;
166-
_=VisualizerInstaller.RunVisualizer(project);
167-
}
168-
#endif
169163
GUILayout.EndVertical();
170164
}
171165

@@ -199,6 +193,27 @@ public override void OnInspectorGUI()
199193
GUILayout.EndHorizontal();
200194
GUILayout.EndVertical();
201195

196+
#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX
197+
GUILayout.Space(10);
198+
EditorGUILayout.LabelField("Visualizer Tool");
199+
200+
GUILayout.BeginHorizontal("TextArea");
201+
if (GUILayout.Button("Open Visualizer"))
202+
{
203+
var project = Application.dataPath;
204+
_=VisualizerInstaller.RunVisualizer(project);
205+
}
206+
207+
if (GUILayout.Button("Check For Updates"))
208+
{
209+
var project = Application.dataPath;
210+
_=VisualizerInstaller.CheckForUpdates();
211+
}
212+
213+
GUILayout.EndHorizontal();
214+
GUILayout.Space(10);
215+
#endif
216+
202217

203218
if (EditorSettings.asyncShaderCompilation)
204219
{

0 commit comments

Comments
 (0)