//find and connect to a Play Tray public void Connect() { PortName = ""; partialLine = ""; string[] playTrays = PuzzletUtility.GetPlayTrayPorts(); Debug.Log("all play trays"); foreach (string playTray in playTrays) { Debug.Log(playTray); } foreach (string playTray in playTrays) { if (!badConnections.Contains(playTray)) { PortName = playTray; break; } } if (PortName == "") { badConnections.Clear(); StartCoroutine(RetryConnection()); return; } #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN serialPort = new WindowsSerial(); #elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX serialPort = new MacSerial(); #endif serialPort.OpenSerial(PortName, Baud); puzzletConnection.PuzzletConnected(); }
public void PuzzletConnectedIOS() { puzzletConnection.PuzzletConnected(); }
public void PuzzletConnectedAndroid() { puzzletConnection.PuzzletConnected(); }