Skip to content
Unity3D to Arduino serial communication on Mac.
C# Other
  1. C# 88.8%
  2. Other 11.2%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Mac Unity to Arduino serial communication.

This is a Unity-to-Arduino serial communication solution that works both in unity editor and on Mac desktop builds. If you put this code in projects earlier than unity 2017.1.2f1, Mac builds will not work with serial, but editor might?

Mac OS version (not tested on windows) Connect to Arduino on serial over usb.

The Arduino .ino code is included in this unity project. Build to your Arduino through Arduino IDE. Tested on Arudino UNO and Arduino Nano.


  1. Auto-connects to arduino
  2. Serial communication works both in editor and on mac desktop builds.
  3. Project polls three analog pins for their values, one analog pin at a time.

Things to observe:

  1. The serial communication from unity to arduino is single character.
  2. The respons from arduino is a string with the calling single character, followed by a numeric value.
You can’t perform that action at this time.