LSL4Unity
LSL4Unity copied to clipboard
LSL4Unity and Build Setting
Hi everyone,
I am trying to connect LSL to a software called Aurora. It is software for neuroimage equipment (fNIRS). My problem is: In the editor mode, the Aurora detects the LSL from my unity project. However, when I generate a .exe file (build setting), this detection fails. When I open the generated file, the LSL is not detected by Aurora anymore.
Did anyone have this problem?
To help isolate the problem, can you please exclude Aurora?
Try LabRecorder. Does LabRecorder see the streams when running Unity in the Editor and/or when running the compiled exe?
Assuming it works in the Editor but not as a built exe, then the next thing to try is to run Dependencies-Gui.exe and use it to inspect your built Unity game .exe. Is it not finding a dependency?
If it is indeed finding all the dependencies, then there's a network issue. Try here, especially the parts about lsl_api.cfg
LabRecorder just detects LSL in the editor mode. I ran the Dependencies-Gui.exe, and everything works correctly.
I am studying the probability of having a network issue. Is there any configuration in Unity properties that could cause this problem when compiling an exe file?
Hmm... in Mac we see the opposite problem: Doesn't work in the editor but does work in the compiled product. My theory there is because the Editor sandboxes multicast packets which are part of the stream discovery process.
I don't know if I've ever seen the opposite.
My first thought is that the wrong lsl.dll is being bundled, or not at all, but DependenciesGui should have identified that problem. Are you by chance compiling for a different target than the editor, e.g. Win RT?
My second thought is a network setting in Unity, as you suggest. I don't recall what settings I had to modify, if any. If you find such a setting then please let us know and I will update the README.
Some of the lsl_api.cfg changes I suggested can make it so that the multicast packets aren't required for stream discovery (at least that's my reading of the docs) so that can help identify if that's the problem.
I fixed the problem.
I read the instructions related to network issues, but none were related to LSL failed detection on my computer.
I removed Visual Studio from my computer because I suspected that I could have installed something that could be conflicting with LSL. I added just the basic packages for C# in Visual Studio, and in Unity, I installed LSL4Unity.
I'm not sure, but before these procedures, when I was reading about LSL, I had installed liblsl-Csharp. Maybe there is a conflict between LSL4Unity and liblsl-Csharp. This time I did not add this package, and both LabRecorder and Aurora detected the LSL signal in the compiled file (.exe) and in the editor mode.
I will do some more tests, and I hope everything works out well!
Thank you for your support and time!