Android上的串行端口,可与unity一起使用 [英] Serial Port on Android for use with unity

查看:128
本文介绍了Android上的串行端口,可与unity一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Unity使用C#开发的Android应用,并且我已经使用OTG电缆将Arduino Nano板连接到了手机.我尝试在Windows机器上使用COM3-Port在Unity Player中运行该应用程序,但是android上的串行端口是什么?我找不到任何工作.我希望你们中的某人知道如何弄清楚串行端口.

I have an Android app developed in C# using Unity and I have an Arduino Nano Board connected to the phone using an OTG cable. I tried running the app in the Unity Player with the COM3-Port on my Windows machine, but whats the serial port on android? I couldn't find anything working yet. I hope someone of you knows how to figure the serial port out.

推荐答案

您需要使用System.IO.Ports命名空间,并将Android兼容性更改为.Net 2.0,而不是Subset. 转到项目设置>>播放器,然后在此处设置为.Net 2.0

You need to use System.IO.Ports namespace and change your android compatibility to .Net 2.0 , not Subset. Go to Project Settings >> Player and set here to .Net 2.0

这篇关于Android上的串行端口,可与unity一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆