private void OnMouseDown() { if (beaconManager == null) { beaconManager = FindObjectOfType <RoomBeaconManager>(); } beaconManager.SelectBeacon(this); }
// Use this for initialization void Start() { rangeModel = transform.Find("Range"); rangeText = transform.Find("Range_Text").GetComponent <TextMesh>(); beaconManager = FindObjectOfType <RoomBeaconManager>(); //default state with nothing selected, no beacons found rangeModel.GetComponent <Renderer>().material = mat_red; DeselectBeacon(); }