mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.82k stars 1.58k forks source link

is it suitable for UNITY #399

Open AlexandrVladyka opened 2 years ago

AlexandrVladyka commented 2 years ago

Hello. Can I use this library for UNITY ?

kai-morich commented 2 years ago

please check https://github.com/mik3y/usb-serial-for-android/wiki/FAQ#Does_this_library_work_with_UnityIonicCordovaXamarinApp_Inventor_development_framework

AlexandrVladyka commented 2 years ago

Can you tell me how to interact with this library in UNITY?

kai-morich commented 2 years ago

I am not a Unity user. Please follow instructions mentioned in Unity manual, like this and add usbSerialForAndroid folder from this repo

cvasquez-github commented 2 years ago

Here is an example on how to send a command from Android to Arduino in Unity using this library, hope it helps: https://github.com/cvasquez-github/unity-android-serial-arduino

mspeirone commented 1 year ago

Hello. I've implemented this library as a Unity plugin, and all is working well is the Scripting Backend in Unity is set to Mono; but, if I change it to IL2CPP (what is, actually, I need, because I need support for 64bits devices, and upload the app into Google Play), the plugin using this code is not working properly anymore. The communication speed is too slow, and I lost it just a couple of seconds after establishing connection.

Do you have any suggestions to fix it?

jhclaura commented 1 year ago

@mspeirone did you find the solution for it? if so would you kindly share your findings? I'm also interested in using this library as an Unity plugin, with IL2CPP scripting backend. Thanks!

mspeirone commented 10 months ago

@mspeirone did you find the solution for it? if so would you kindly share your findings? I'm also interested in using this library as an Unity plugin, with IL2CPP scripting backend. Thanks!

No @jhclaura, I didn't find the solution using this library... we finally implemented it by using our own Android plugin using Android Studio, which finally was integrated into Unity.