Unity to Arduino through Unity App

Hey guys, i’ve managed to use my keyboard and send serial data to arduino. But, now i’m trying to use a simple app to do the same. But, whenever i change my build settings to Android i get an error saying “The type or namespace name `Ports’ does not exist in the namespace” the library is already in there and working on computer. But, not when i switch it to android. Is there anything i can do? Thanks

Serial ports on Windows are very very different from (virtual) serial ports on Android. How are you connecting your Arduino to your Android device? Setting up USB connection to Arduino is a little difficult on Android (need a special driver). If you’re connecting via bluetooth then check out one of the many Arduino bluetooth packages on the asset store.

See also:
GitHub - mik3y/usb-serial-for-android: Android USB host serial driver library for CDC, FTDI, Arduino and other devices. (pretty easy to use for native android apps)
Google “unity usb serial android” and you’ll find a lot of information on why people don’t bother with this and just go with bluetooth (I mean you don’t want to be tethered to your Arduino anyway, do you?).