Making SelectCameraHandler and SceneControllerEditor more resilient.

parent c0f8ab5c
......@@ -15,10 +15,7 @@ public class SceneControllerEditor : Editor
public override void OnInspectorGUI()
{
SceneController sc = (SceneController) target;
if (GUILayout.Button("Refresh list of semantic labels"))
{
JSONHandler.instance.RefreshSemanticLabels();
}
JSONHandler.instance.RefreshSemanticLabels();
EditorGUILayout.Space();
base.DrawDefaultInspector();
......
......@@ -7,10 +7,9 @@ public class SelectCameraHandler : MonoBehaviour, IPointerClickHandler
private Transform mainCamera;
public Transform thisCamera;
void Start()
{
mainCamera = GameObject.Find($"Main Camera").transform;
mainCamera = Camera.main.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