Python 官方文档:入门教程 => 点击学习
转载自:Http://download.csdn.net/download/ximenguyu/7639659一、问题:Assets/Scripts/SerialPortReciever.cs(7,17):error CS0234: The
转载自:Http://download.csdn.net/download/ximenguyu/7639659
一、问题:
Assets/Scripts/SerialPortReciever.cs(7,17):error CS0234: The type or namespace name `Ports' does not exist in thenamespace `System.io'. Are you missing an assembly reference?
本人使用的版本是Unity3D4.2,想在游戏里加串口通信的代码,结果编辑器一直报以上的错误,其实在代码里已经包含命名空间的导入,而且代码编辑器也没有报错:
usingSystem.IO.Ports;
二、解决办法:
1、打开Unity工程,在菜单栏中点开File-->Build Setting...
2、在设置中找到
OtherSetting-->Optimization-->api Compatibility Level-->.NET2.0
3、重启Unity,之后就不会有同样的报错了;
4、如果想在Unity中使用对数据库的操作(System.Data.dll)同样要按以上步骤设置;
--结束END--
本文标题: [Unity3D]Unity3D使用串口
本文链接: https://www.lsjlt.com/news/183477.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0