Search code examples
c#unity-game-enginegamepad-api

ViGEm.NET namespace missing when using Unity?


[this question has the unity3d tag and I can't change it to unity2d]
I was trying to use ViGEm using this tutorial to help me.
But when I was writing the code, a red underline appeared on using Nefarius.ViGEm.Client;
It said: The type or namespace 'Nefarius' could not be found. (are you missing a using directive or an assembly reference?)

How do I make this work with Unity? I have carefully done every step of the tutorial.


Solution

  • These steps fixed it:

    1. Go to the nuget website and download the package.
    2. Extract the file as a .zip file.
    3. Go inside the lib folder and copy the .dll file to [Unity Project]\Assets\Plugins (create the folder if it doesn't exist)