EntryPointNotFoundException: 1 with microsoft dll
Hi, i'm trying to use the old kinect (sdk 1.8) in unity and i don't seem to be able to get it working.
I can use the sdk freely outside of unity, i just add the "Microsoft.Kinect.dll" to the references and everything works fine, but when i try to use the sdk in unity by copying the folder into unity and then try to use it like this:using Microsoft.Kinect; public class Kinecthelper : MonoBehaviour { private KinectSensor sensor; void Start() { foreach (var potentialSensor in KinectSensor.KinectSensors) { if (potentialSensor.Status == KinectStatus.Connected) { this.sensor = potentialSensor; break; } } if (this.sensor != null) { this.sensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30); } if (this.sensor != null) { this.sensor.Start(); } while (true) { ... } }
i just get the following error message:EntryPointNotFoundException: 1 Microsoft.Kinect.KinectSensor..cctor () (at :0) Rethrow as TypeInitializationException: The type initializer for 'Microsoft.Kinect.KinectSensor' threw an exception. Kinecthelper.Start () (at Assets/Kinecthelper.cs:12)
with line 12 being: foreach (var potentialSensor in KinectSensor.KinectSensors)
.
KinectSensor.KinectSensors being a static array of all available devices.
I tried switching platforms for the dll, importing the whole Folder in Plugins, or only the dll. My project settings are:
- Scripting Runtime Version: .Net 4.x Equivalent
- Scipting Backend IL2CPP
- Api Compatibility Level .NET 4.x
Thanks for any help.
Your answer
![](https://koobas.hobune.stream/wayback/20220612232617im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Having referencing Problems while creating a tile brush for an editor in unity 0 Answers
Detecting Collision is not working 1 Answer
Index out of range exeption error help 0 Answers
Coding Errors 1 Answer