Verified Commit c29a124b authored by Sebastian Höffner's avatar Sebastian Höffner
Browse files

Making SelectCameraHandler and SceneControllerEditor more resilient.

parent c0f8ab5c
...@@ -15,10 +15,7 @@ public class SceneControllerEditor : Editor ...@@ -15,10 +15,7 @@ public class SceneControllerEditor : Editor
public override void OnInspectorGUI() public override void OnInspectorGUI()
{ {
SceneController sc = (SceneController) target; SceneController sc = (SceneController) target;
if (GUILayout.Button("Refresh list of semantic labels")) JSONHandler.instance.RefreshSemanticLabels();
{
JSONHandler.instance.RefreshSemanticLabels();
}
EditorGUILayout.Space(); EditorGUILayout.Space();
base.DrawDefaultInspector(); base.DrawDefaultInspector();
......
...@@ -7,10 +7,9 @@ public class SelectCameraHandler : MonoBehaviour, IPointerClickHandler ...@@ -7,10 +7,9 @@ public class SelectCameraHandler : MonoBehaviour, IPointerClickHandler
private Transform mainCamera; private Transform mainCamera;
public Transform thisCamera; public Transform thisCamera;
void Start() void Start()
{ {
mainCamera = GameObject.Find($"Main Camera").transform; mainCamera = Camera.main.transform;
thisCamera = GameObject.Find($"Cameras/{name}").transform; thisCamera = GameObject.Find($"Cameras/{name}").transform;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment