while trying to initialize Vicon Client, I get the following error
MissingMethodException: Method contains unsupported native code
<Module>.<CrtImplementationDetails>.LanguageSupport.Initialize (<CrtImplementationDetails>.LanguageSupport* )
<Module>..cctor ()
The managed code in the assembly provided by Vicon requires the unmanaged code in the C++ SDK , should that be the problem?
Thanks,
R
If you don’t own unity pro or if the .NET DLL they provided you use unsafe code then yes, it won’t work.
Also it must not use .net code thats not present in mono (can sometimes happen when it comes to this kind of interfacing topics with native code)
if you own pro then you can drop the unmanaged dll along the dll into your projects plugins folder and see if the editor picks up
also if it uses native code it will never work in the webplayer and naturally nowhere but the platform it was written for (guess windows)
Thank you so much for your prompt reply, dreamora!
I’m using the PRO version, and the unmanaged C++ DLL from vicon had been in my project folder…yet I keep getting the error…
You got it! it IS windows.
Hey, did anyone get this working. I am currently using VRPN.net to get a head mounted display and polhemus trackers working with unity. The code functions perfect in monodevelop, but it doesn’t work in Unity due to a native code problem. I found by setting the build options to compile specifically to the X86 architecture it works, but i cant find that option in Unity. Any thoughts?
unity is always only x86, unity does not support x64 at all
Ok, then is there any clue on what the issue could be. The main issue is that unity gives me the native code issue. I am using VRPNNET.dll in order to load VRPN data for the HMD. However its constantly giving me the “MissingMethodException: Method contains unsupported native code” issue.
Again the code works outside of Unity when I compile it specifically to x86 (my computer type) but it doesn’t work in unity.
Hi, did you get this resolved? I’m facing similar issues.
same. i’m also facing quite similar issues.
Sorry for the late reply, I did not get it resolved. I ended up writing my own system externally to send in data over a server. I also found after talking to some people from Unity at GDC that the major problem of this is Unity does NOT compile to x64. Wish there was an option to make it to.
I have a similar issue.
Anyone figures out how to solve it?
Error: MissingMethodException: Method contains unsupported native code
When I am trying to use a .dll file.
The dll must use clr/pure mode (or safe mode, I forgot which one), which is restrictive due to mono. I used a C++ plugin instead of C#, and it works great.
http://www.mono-project.com/CPlusPlus
Imtrobin, Based on the link you provided, windows version of mono can use mixed-mode assemblies. If I understand correctly here, it means a mix of CIL and native code, right? Then unity should be able to run a dll with native code in it?
If I remember correctly, It can if the dll plugin don’t use CRT or link to another dll
Hi,
I am working to make a VR arm using Oculus Rift DK2 and Polhemus Fastrak or Polhemus Liberty for tracking. But unfortunately, I did not find how to extract data from Polhemus to Unity. So I will need some help for getting data from Polhemus to move the arms in Unity.
Thanks,