pluxbiosignals / unity-sample

Unity Sample APP intended to show a practical integration of PLUX devices with the Unity environment, encompassing functionalities such as: the search of compatible Bluetooth devices and also the start/stop of a real-time acquisition.
15 stars 3 forks source link

DllNotFoundException: Unable to load DLL 'plux_unity_interface' #12

Closed C1wan closed 2 years ago

C1wan commented 2 years ago

When trying to build with WebXR and the unity-sample. So the DLL of the of the plux_unity_interface.dll is not getting found by WebGL and I am getting this error, here is the full stacktrace:

DllNotFoundException: Unable to load DLL 'plux_unity_interface'. Tried the load the following dynamic libraries: at PluxDeviceManager.SetNewDeviceFoundHandler (PluxDeviceManager+OnNewDeviceFound handlerFunction) [0x00000] in <00000000000000000000000000000000>:0 at PluxDeviceManager..ctor (PluxDeviceManager+ScanResults scanResultsCallback, PluxDeviceManager+ConnectionDone connectionDoneCallback, PluxDeviceManager+AcquisitionStarted acquisitionStartedCallback, PluxDeviceManager+OnRawFrame onDataReceivedCallback, PluxDeviceManager+OnEventDetected onEventDetectedCallback, PluxDeviceManager+OnExceptionRaised onExceptionRaisedCallback) [0x00000] in <00000000000000000000000000000000>:0 at Hybrid8Test.Start () [0x00000] in <00000000000000000000000000000000>:0

Maybe the dll is compiled in C++ and not in C#. Do you have an DLL which is compiled in C#?

GRamosPlux commented 2 years ago

Dear @C1wan,

Thank you very much for opening this extremely positive discussion, we will be pleased to clarify the important question that you attentively formulated!

Your perception is totally correct, the .dll was compiled in C++. Unfortunately, we don't have the .dll used in the Unity integration available in C#. Our sincere apologies for this limitation.

However, hoping that it can be helpful in overtaking the current obstacle, we have a native C# version of the PLUX API, which I am pleased to share in the following link:

My best and sincere regards, @GRamosPlux

C1wan commented 2 years ago

First of all thanks for the answer, so would it be able to use the native C# version in Unity for WebXR/WebGL or is this not possible? Note: I only need the data from the Hub and not a GUI. Thanks in advance, @C1wan

GRamosPlux commented 2 years ago

Dear @C1wan,

This is a very pertinent question, but, sadly, after discussing the topic with one of my colleagues, it seems that the C# API is a wrapper of our C++ API, which take us back to the starting point. I am sorry for the inadequate information provided before.

The combination of Unity and WebXR/WebGL, made in your research, is something new for the team, being fantastic to see the members of our esteemed community of users push the limits of our systems/software solutions to unexplored and very exciting applications.

However, due to its novelty nature, unfortunately, for now, it seems that our APIs (based on C++ code) are not compatible with the WebXR/WebGL paradigm.

Despite these less positive news, we strongly hope that the previous information can be helpful!

My best and sincere regards, @GRamosPlux

C1wan commented 2 years ago

Dear @GRamosPlux ,

thanks for the quick answer helpful suggestions. Greetings @C1wan

GRamosPlux commented 2 years ago

Dear @C1wan,

Thank you very much for your attentive words and deep comprehension regarding this limitation.

If any new question arises, please, do not hesitate to open a new issue, we are always glad to support our enthusiastic community of users.

In the meantime, the team would like to wish you luck for your research project.

My best and sincere regards, @GRamosPlux