finds.dev← search

// the find

relativty/wrmhl

★ 651 · C# · MIT · updated Aug 2021

(Archived) Simple communication between Unity3D and Arduino - by Maxim xyz.

A threaded serial bridge between Arduino and Unity3D, solving the latency problem that plagues naive SerialPort usage in Unity's main thread. It offloads serial reads to a background thread and exposes the latest value via a thread-safe queue. Archived since 2021 and targets Unity's old .NET 2.0 API level.

The core threading approach is sound — reading serial on a background thread and surfacing data to Unity's Update() loop is exactly the right pattern. Two prefab variants (latest-value and queued) give you a choice between 'give me the most recent sensor reading' and 'give me every line', which covers the main use cases. It ships as a Unity package you can import directly, lowering the setup friction. The protocol layer is swappable — you can drop in your own wrmhlThread_Lines.cs subclass without touching anything else.

Archived for five years and built against Unity's .NET 2.0 compatibility level, which Unity has been deprecating in stages; you will need to port it before using it in any modern project. No error handling around SerialPort disconnects or COM port enumeration — if the Arduino drops out, the background thread silently dies. Write support exists but is barely documented and has no examples beyond the demo scene. With 651 stars and no maintenance, any bugs you hit are yours to fix.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →