MissingMethodException with C++ CLR Plugin

Hi,

I’m trying to use Phantom Omni Haptic arms with Unity3D.

In Visual Studio 2012:
I’m creating a static lib using OpenHaptics SDK in C/C++.
This lib is used in a (safe) CLR dll project which creates an interface with C#.

Everything works fine in Visual. I created a C# test project with the same configuration as Mono => Targeting .NET 4.0 for x86 Compiler. I can query the device and apply forces to it in C#!

In Unity:
Mono is targeting .NET 4.0 for x86 platforms.
After adding a reference to my dll in Mono, I can compile the code.

But when I try to run my project I get a
MissingMethodException: Method contains unsupported native code.

I followed that link but that idn’t help…

Any clue would be much appreciated =)

Thanks guys !

Not really…

I ended up creating a C++ dll and using dllimports in Unity, not really what I wanted but it did the job !

Hi there,

I have develop a simple haptic plugin for unity using openhaptics.

Plugin available on the Unity Asset Store at:

Enjoy.

Matt.