NationalInstruments in Unity

Hi everybody!
I want to use Unity to trigger some events through a National Instrument device.
I have pasted the nicaiu.dll in the Assets folder of my project, but if I try to access to it with “using NationalInstruments” on top of my script I receive the following error:
“The type or namespace name ‘NationalInstruments’ could not be found (are you missing a using directive or an assembly reference?)”.

What steps should I implement to make things work?
Thank you
Federica

You’ll need to write a script with C# functions that mirror the ones declared in the plugin, and use DllImport. This assumes you have knowledge of API exposed by the dll, as well as the data types used throughout it.

Relevant links:

https://www.mono-project.com/docs/advanced/pinvoke/

Ideally find a version of the library you want that is already INTENDED to be used under Unity, or find someone who actually has done the integration and knows what you need, or else you have a lot of work ahead.

100% of everything that Arkano says above… but also you would want to cross-check the C# and .NET and compatibility of that library with the specific version of Unity you are using.

Beware that Unity does not implement 100% of all .NET, especially in IL2CPP, which does not implement System.Process for example, requiring you to do your own integration for any calls to those endpoints.