Thursday, 27 February 2025

Trying Out BrainFlow on Different Platforms: Unity vs. Electron + React

I was surprised to find that the BrainFlow plugin actually worked somewhat okay in Unity, despite my earlier attempts where it didn’t work at all. It still has occasional issues compared to the Node.js version I’ve been using recently, but I managed to create a small neurofeedback application with brainwave entrainment-style audio feedback—similar to what you’d find in ambient brainwave tuning apps.

It would be interesting to explore whether brainwave entrainment combined with AI functionality could enhance efficiency. I plan to publish the repository on GitHub soon, and this could serve as a solid starting point for more experimental projects involving brainwaves and VR.


That said, Unity still has some downsides, like occasional device freezes and slow load times when using this library. Because of this, I decided to test how Electron and React would handle BrainFlow. I quickly noticed that the library worked much better in Node.js, so I gave it a try. Setting up Electron + React was surprisingly smooth, thanks to a boilerplate project I found. It felt like an easy way to create a desktop app that could also be adapted to a web environment if needed. Everything compiled quickly, hot module replacement worked seamlessly, and nothing felt slow or broken.

Overall, both platforms have their strengths. However, I find myself preferring the JavaScript version because it’s faster to edit, compile, and run, and the library is more stable without freezing. Plus, it’s more adaptable to other web technologies. That said, I’ll still be using Unity for game-related projects, and I could see myself partially replacing some BCI modules with a JS-based OSC implementation in the future.

Trying Out BrainFlow on Different Platforms: Unity vs. Electron + React

I was surprised to find that the BrainFlow plugin actually worked somewhat okay in Unity, despite my earlier attempts where it didn’t work a...