private void OnMouseUpAsButton() { if (selected == null) { selected = this; gameObject.GetComponent <MeshRenderer>().material.color = Color.red; detailCamera.transform.position = linkedComponent.transform.position + new Vector3(0, 0, -60); detailCamera.enabled = true; } else if (selected == this) { selected = null; gameObject.GetComponent <MeshRenderer>().material.color = Color.yellow; detailCamera.enabled = false; } else { selected.GetComponent <MeshRenderer>().material.color = selected.getColorStart(); selected = this; gameObject.GetComponent <MeshRenderer>().material.color = Color.red; detailCamera.transform.position = linkedComponent.transform.position + new Vector3(0, 0, -60); } // load tracking scene SceneManager.LoadScene("SimpleModelTrackerExample"); }