EntryPointNotFoundException when trying to use ViGEm.NET with Unity

So I was trying to use ViGEm along with Unity, this is the steps I took trying to implement it:

  1. Downlaod NuGet package
  2. Extract the DLL from it and put it in the Unity project
  3. Follow the rest of the steps in the .NET feeder example

(I did this since the steps listed in the .NET feeder example doesn't work for Unity)

When I ran the program, this error appeared: 2f6703fa-046f-4be5-acd8-40b343a8f118-image.png

ControllerManager.cs, shortened:

public ViGEmClient vigem;
void Start(){
    vigem = new ViGEmClient(); // EntryPointNotFoundException

Things I tried to fix this:

  • Set Unity's API compatibility level to .NET v4.x (also I use Mono instead of IL2CPP if that makes a difference)
  • Set project target framework to .NET Framework v4.5.2

The dotnet library has the native C SDK embedded, that is supposed to get extracted and loaded automatically on start, I have no idea if Unity supports this, see https://github.com/Fody/Costura

What am I supposed to see exactly? Do I need to install this?

IDK if Unity is compatible with what Fody Costura does, so all I can do is guess as well. Basically it is supposed to transparently extract and load the C DLL of the ViGEm SDK that he assembly has embedded as a resource. Again, I have no idea if Costura and Unity play nice together, I can just tell you how it works under the hood. I never developed for or supported Unity so I don't have special insights and need to guess.