I have Kinect working fine.
I’m using VS as external editor for Unity with no problems.
I’ve connected Kinect with Unity with KUInterface.dll, it’s worked.
But i’m so audacious i want to do next thing:
-
Import Microsoft.Kinect.dll (Program Files\Microsoft SDKs\Kinect\v1.6\Assemblies) as an asset to my project (succeeded).
-
Use it in my script (
using Microsoft.Kinect). It seems to work, because after doing that VS starts to suggest all of the classes, included in Microsoft.Kinect (from the official documentation). -
And finally, i want to make it work in Unity, but i occur next problem:
Unhandled Exception: System.TypeLoadException: Could not load type ‘System.Runtime.Versioning.TargetFrameworkAttribute’ from assembly ‘Microsoft.Kinect’.
at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Module,string,bool,bool)
at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in :0
at System.Reflection.Assembly.GetType (System.String name) [0x00000] in :0
I’m almost sure it’s because of differencies in .NET versions (Microsoft.Kinect uses 4.0 and Unity goes with 3.5).
So i don’t know if it’s even possible, to make it work such way? And can anyone provide some solution how to do it?
And, if you don't mind passing the DLL along with the exe instead of inside the Unity assembly, you don't even need Pro.
– R-Villani