Page 1 of 1

Error importing NatNetML.dll into Unity project

Posted: Wed Jul 24, 2013 8:32 am
by Aiur
Hello,

I'm trying to set up a system with Motive streaming data to a Unity application to implement real-time full-body tracking. I'm using the latest version of each software at the time, NatNet 2.4 and Unit 4.1.5f1. I was trying to add the NatNetML library into my Unity3D project, but as soon as it is imported, the following error comes up:

TypeLoadException: Could not load type 'System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute' from assembly 'NatNetML'.

Does anyone got this error before? Any suggestion on how to fix it?

As a side note, I'd like to mention that all the samples provided in the NatNetSDK work perfectly, therefore it seems there could be some sort of incompatibility with Unity.


One alternative to me would be to use the scripts provided by Morgan here:
http://forums.naturalpoint.com/viewtopi ... 59&t=10454

But I assume these scripts were created using NatNet 2.2, and, as the NatNetSDK web page states, there have been some changes in the bitstream syntax. Therefore the scripts need to be updated if I want to stick to the idea of using Motive. Could anyone confirm me this point?

Thanks in advance

Re: Error importing NatNetML.dll into Unity project

Posted: Sun Jan 12, 2014 10:18 pm
by Aranda
The error thrown by Unity is due to NatNetML.dll being compiled against the .Net 4.5 framework and Unity only supporting up to .Net 3.5. Hopefully in future SDKs Natural Point will provide us with a NatNetML.dll that is in sync with Unity's current .Net version. Until then, I think Morgan's scripts are the way forward.