Is it possible to use System.IO.Ports in Unity?

price32768 0 Reputation points
2024-12-09T14:30:22.17+00:00

I tried to use IoT.Device.PN532 based on System.IO.Ports in a Unity Project.

And now Unity shows:

PlatformNotSupportedException: System.IO.Ports is currently only supported on Windows.

System.IO.Ports.SerialPort..ctor (System.String portName, System.Int32 baudRate, System.IO.Ports.Parity parity, System.Int32 dataBits, System.IO.Ports.StopBits stopBits) (at <eabc9cb4ff56410badff95faf89658e0>:0)

(wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort..ctor(string,int,System.IO.Ports.Parity,int,System.IO.Ports.StopBits)

Iot.Device.Pn532.Pn532..ctor (System.String portName, System.Boolean checkVersion) (at <e77304a1d47943a791a1857e85d0f10f>:0)

pn532Reader.Start () (at Assets/pn532Reader.cs:11)

Community Center | Not monitored
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.