// Use this for initialization void Start() { SPO2Reader reader = new SPO2Reader(portName, maxQueueSize); processor = new SPO2Processor(reader); processor.Start(); }
public void Reconnect(string portName) { this.portName = portName; processor.StopAndJoin(); SPO2Reader reader = new SPO2Reader(portName, maxQueueSize); processor = new SPO2Processor(reader); processor.Start(); }
void OnDestroy() { Time.timeScale = 1; if (processor != null) { processor.StopAndJoin(); processor = null; } }
void OnApplicationQuit() { Time.timeScale = 1; if (processor != null) { processor.StopAndJoin(); processor = null; } }