SerialPort Throws IOException in Unity 5.6

Does anyone know if this is a new known issue with Unity 5.6? I wrote an Arduino to Unity connection before with SerialPorts, but now it seems in Unity 5.6 when you try to open a SerialPort, it always throws the IOException that access is denied. I’ve tried it on multiple computers in the editor, so it seems to be a consistent issue. And the ports I access are usually COM4 or COM 5.

There’s no changes going to 5.6 that should have changed that… are you certain it has to do with the version. Have you reverted to 5.5 and tested there on the same machine?

Usually an access denial of a serial port is usually because some other system resource currently is accessing the port in question. Are you sure you don’t have some other program currently accessing the arduino, or that you didn’t do it twice in the unity application in question? Or have you maybe started a thread that accesses it, and not closed said thread before rerunning it (threads can live between play sessions in the editor)?

Looks like I forgot a completely obvious and boneheaded tenant of working with the Arduino. Close the Arduino IDE before using Unity. Doh. Thanks @lordofduct . By reading your comment, it made me aware that it was open.

Although, now there seems to be another issue with a TimeoutException being thrown, inside Unity despite me giving a
serialPort.ReadTimeout value.