Requirements
| Unity | Unity 6 (the version the package is built on). Also works in 2021.3.18+ (tested on 2021.3.45f2) with a few extra steps: see Unity 2021.3 setup. |
| Packages | Input System (Window > Package Manager > Unity Registry > Input System) |
| Scripting API level | .NET Framework (Player > Other Settings > Api Compatibility Level) |
| Platforms | Windows, macOS, Linux (Editor and standalone players). Not Android, iOS, WebGL or consoles. |
| Board | Any Arduino-compatible board that can run StandardFirmata (Uno, Nano, Mega, Leonardo, Micro, …) |
Two ways to talk to the board
Section titled “Two ways to talk to the board”- Firmata (recommended): upload StandardFirmata once, then Unity discovers the board’s pins for you.
- Custom text: your own sketch sends lines like
D2:1;A0:512.
The .NET Framework requirement
Section titled “The .NET Framework requirement”Serial ports only exist under .NET Framework. Unity 6 defaults to .NET Standard 2.1, which has no serial port support.
The package guards its scripts with a scripting define, SERIAL_INPUT_BRIDGE, which it adds and removes for you as the API level changes. While your project is still on .NET Standard, the package’s scripts are switched off and Tools > Serial Input Bridge shows only one item:
Tools > Serial Input Bridge > Fix API Compatibility Level
Click it. Unity recompiles and the rest of the menu appears. You can also set the API level yourself and the define follows.