0 votes

Comment: I'd really appreciate any help I can get with this, even if it's just a pointer in the right direction rather than the ultimate solution. I've run out of ideas and can't find anything about using the kinect with godot online.

Godot Version: 3.2.1 Mono
OS: Windows 10

I followed this tutorial on using external libraries in Godot and did manage to get it to work with the Newtonsoft.Json package the guy used in the video. The tutorial tells you to just reference the .dll in the .csproj file like this:

<Reference Include="Newtonsoft.Json">
  <HintPath>$(ProjectDir)\lib\Newtonsoft.Json.dll</HintPath>
  <Private>False</Private>
</Reference>

I then tried the same thing with this package for the Kinect. I can have the line using Microsoft.Kinect; in my scripts without errors and autocomplete is working, but as soon as I actually mention anything from this sdk in the class, I get errors. What makes this confusing is that the error messages are different depending on where in the script I use the kinect library. Declaring a member variable (private KinectSensor sensor = null;) results in these errors:

If I use a line like KinectSensor sensor = KinectSensor.GetDefault(); in the ready method, I get this: E 0:00:00.612 debug_send_unhandled_exception_error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Kinect, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. That's a lot less cryptic but still doesn't tell my why the file couldn't be loaded.
I do have the kinect sdk installed and that's working fine. I also read through the documentation on binding external libraries, but couldn't figure out how to get a static library from the .dll file that I got from NuGet.

https://docs.godotengine.org/en/stable/development/cpp/binding_to_external_libraries.html

asked Jun 3 in Engine by manfromtheinterwebs (12 points)

I get the same error.

Can you try using that Package in a normal, non Godot C# Project? Console Project for example?

Yes, the package works in a WPF app. I haven't tested much of the functionality, but I can see the kinect turn on when I run my program.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.