/// <summary> /// Method for starting and stopping scanning. Updates text on scan button as well /// </summary> public void ToggleScanning() { if (scanButtonText.text == "START SCANNING") { awe_estimote.StartScan(); scanButtonText.text = "STOP SCANNING"; } else { awe_estimote.StopScan(); scanButtonText.text = "START SCANNING"; } }
// Update is called once per frame void Update() { heading = Input.compass.trueHeading; txt.text = heading.ToString(); if (awe_estimote.beacons == null) { awe_estimote.StartScan(); txt.text += "(X)"; } else { txt.text += "(" + awe_estimote.beacons.Count + ")"; } txt.text += ":" + GetLoc().ToString(); }