How do I use a C# dll library from a script?

I found two math dlls written in c# that I would like to use in Unity3d. one is dotnumerics.dll and another one called MathNet.Iridium.dll

I want to access the routines in these libraries from javascript.

I tried putting the dotnumerics.dll into the assets folder but then what?

I also tried lines like

import DotNumerics

but that doesn’t work either.

Does anybody know how to access a c# dll from unity javascript?

thanks,

Dan

Try creating a Plugins folder under Assets and move the dll files there.

You need to reference the specific namespace you are using in the .dll file. For example, (in C#) if you were to use the DotNumerics package for Linear Algebra you'd have to code the following:

using DotNumerics.LinearAlgebra;
using DotNumerics;

Similarly, for MathNet.Iridium:

using MathNet.Numerics;
using MathNet.Numerics.LinearAlgebra;