Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSL4Unity for VR? #47

Open
devriesewouter89 opened this issue Oct 18, 2022 · 1 comment
Open

LSL4Unity for VR? #47

devriesewouter89 opened this issue Oct 18, 2022 · 1 comment

Comments

@devriesewouter89
Copy link

devriesewouter89 commented Oct 18, 2022

Hi all
I'm trying to understand what the best approach is to integrate LSL into a unity app build for a Pico Neo 3 pro VR headset. The device is running android.
I'm not sure: is it best option to use the LSL4Unity plugins or should I check out liblsl-android?

If I try to use LSL4Unity, by building one of the samples, I'm not able to build for android as I get the message:
Found plugins with same names, Packages/com.labstreaminglayer.lsl4unity/Plugins/LSL/Windows/x64/lsl.dll and Packages/com.labstreaminglayer.lsl4unity/Plugins/LSL/Windows/x86/lsl.dll. Delete the one of the duplicate plugins.

Two things don't seem right:

  1. I'm not targetting a windows device
  2. I can't delete these plugins: "the operation 'softdelete' is not allowed in an immutable package.

Am I using the plugin the wrong way or should I be using the android library? (which hasn't been updated since some years...)

Thanks a lot!
Wouter

@cboulay
Copy link
Collaborator

cboulay commented Oct 18, 2022

Have you seen https://github.com/labstreaminglayer/PicoNeo2Eye ?

I wrote that before LSL4Unity was revamped as a custom package, so I was mostly using LSL.cs .

I think you're confused about something.
You need both a language wrapper and a shared library.

liblsl-Csharp and liblsl-Java are both language wrappers. They each provide an interface into the liblsl shared library for those languages. (We similarly have liblsl-Python, liblsl-Rust, liblsl-Julia, liblsl-Matlab, etc.). Unity doesn't use Java, so you have no need for liblsl-Java.

The language wrappers are useless without a library binary. The library you need depends on the platform you're targeting. Some language wrappers ship with some library binaries, but this doesn't cover all platforms. We have a couple different lsl.dll for windows (x86 and x64), we have a few liblsl.dylib for Mac, and several liblsl.so for different flavours of Linux. In Android, you can use liblsl.so (built for your specific ARM processor), or you can use a .aar file. I have no experience with these.

LSL4Unity is just a convenient packaging of a language wrapper (LSL.cs), a bunch of shared libraries for different platforms (but admittedly not Android), and some sample code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants