XInputDotNetPure plugin: Namespace could not be found.

So to avoid using the tedius Input Manager, I decided to try out an XInput plugin for Unity: GitHub - speps/XInputDotNet: C# wrapper around XInput, works with any Mono or .NET application (eg. Unity3D)

I followed the instructions under the Using With Unity section (three attempts), including the special instructions for the free version (which is what I have), yet visual studio still can’t find the namespace:

using XInputDotnetPure;

I’ve tried closing and re opening unity and visual studio; didn’t help. I get no errors in the actual inspector, but in visual studio I get the standard “The type or namespace name ‘XInputDotNetPure’ could not be found (are you missing a using directive or an assembly reference?)” error.

The test project and scene that comes with XInputDotNet doesn’t give me this error and seems to work fine.

EDIT: Actually the test project and scene now IS giving me the same error. However, upon testing, the code DOES in fact work. 360 controller input IS working with the plugin…

So this is now a much more minor problem than I had originally thought, hopefully my code will still work, but it is going to be quite inconvenient coding without the intellisense for anything that uses the namespace. Not too big a deal, but still, a solution would be nice.

I’m guessing now this is a visual studio issue more than it is a Unity issue?

I was having a problem with this plugin also but I was able to fix it by configuring the dll import settings. Make sure you configure the following:

  • XInputDotNetPure.dll
  • x86/XInputInterface.dll
  • x86_64/XInputInterface.dll