Needing advice/pointers on Unity + BCI workflow
English is not my first language, so apologies if there are unclear things here.
I am currently tinkering with OpenBCI integration with Unity as part of my academic research. I've got some basic experience with Unity and EEG signal processing alike (using SciPy and existing datasets), though this is the first time I attempt to implement BCI on Unity (using brainflow), so I'm... a little lost.
(What I aim to do is to control Flappy Bird-like game using BCI, but I won't delve too much into it for now. Instead, I want to ask about the "general" workflow on BCI-Unity integration.)
I've successfully connected the OpenBCI to Unity using brainflow and get some data from it, so that's a start. However, it's the next steps that I'm still confused at. So for now, here are a few questions I'd like to ask:
1. Should I also integrate the training session into the game (i.e. also implement it in Unity)? If that's the case, then does it mean I should also do the training data recording on Unity as well (including the classification model training), or should I write a separate console C# program for that and only use the trained model in Unity? (especially since I'm not sure about ML implementation in Unity yet)
2. Say that with the existing model, I want to retrieve the signal (in real-time/online) and classify it into a relevant input. The thing is that since Unity calls on Update() and FixedUpdate() on periodic basis, how am I supposed to handle this? Should I let the signal processing take place in every Update()/FixedUpdate() call, or should I set a timer/countdown and only do the signal processing and classification when that countdown runs out?
I'd like to learn more, so any pointer is appreciated. Thank you!