IEnumerator NewValueListener() { VideoController videoCont = FindObjectOfType <VideoController>(); while (newValue != "ready") { if (newValue != "") { print(newValue); newValue = ""; } yield return(null); } print("Ready"); newValue = ""; //videoCont.StartRecording(); while (true) { if (newValue != "") { if (newValue == "null") { trackerCont.SetProjectionEnabled(false); } else { trackerCont.PlaceProjection(newValue); } print(newValue); newValue = ""; } yield return(null); } }
private void onIncomingData(string data) { if (data != "null") { trackerCont.PlaceProjection(data); } else { trackerCont.SetProjectionEnabled(false); } }