Unity 4 (Mac) + Arduino : unity mac IOException: No such file or directory

Dear all

I wonder if anyone has experienced the problem on Mac. I tried to use Arduino to communicate with Unity 4 (just a simple test sending a sensor value to Unity via serial communication).

It works perfectly fine on Windows, but on Mac, I got "IOException: No such file or directory " error.

Any idea how to solve this issue?

thanks!
Jim

Same Problem here!
This is the code im using on the Unity Side:

and this on the Arduino side:

both are just little tests, but i simply cannot get it to run!

Any idea would be great!!

Thanks!!

Open your Terminal and search ls /dev/tty.* to find the serial port for your Arduino. It will look something like /dev/tty.usbmodem1411. Then replace COM3 in the above script with /dev/tty.usbmodem1411 or whatever your search showed.

You should also make sure that you’ve changed the below setting;
Edit > Project Settings > Player > Other Settings > Api Compatibility Level > NET 4.x.

1 Like

i was really stuck in the project and then tried your answer it really helped
thanks alot lucymcloughlin

are you using /dev/tty.usbmodem or /dev/cu.usbmodem ?

Thanks!!