// Update is called once per frame void Update() { /*if (startCount == 0) * { * setScreen(SceneManager.GetActiveScene().name); * startCount++; * } */ if (Input.GetKeyDown(KeyCode.Return)) { loadScene(); } if (Input.GetMouseButtonDown(1)) { Debug.Log("serial close"); SerialHandler_.Close(); } if (Input.GetKeyDown(KeyCode.Escape)) { Quit(); } }
void OnDestroy() { _serial.Write("@stop#"); _serial.Close(); }
void OnDisable() { serial.Close(); serial.OnDataReceived -= SerialCallBack; }
public void Close() { serialHandler.Close(); }
void OnDestroy() { _input = Vector3.zero; SendValue(); _serial.Close(); }