3
我已经通过COM端口将Unity项目连接到Arduino主板。我从它接收数据精细而使用SerialPort.ReadLine()
,但是,如果我使用SerialPort.ReadExisting()
我得到的错误:C#SerialPort.ReadExisting错误
Object reference not set to an instance of an object
我需要使用ReadExisting我的应用程序不能跟上的Ardunio板吐出率数据。
我已经得到了ReadExisting在XNA项目中正常工作,正好在统一项目中使用时,我遇到了问题。
任何帮助将不胜感激。
Unity不允许您使用DataReceived事件 – user346443 2010-08-23 05:06:11