MrTimcakes / Unity-DirectInput

Unity Native Plugin to expose DirectX DirectInput ForceFeedback
GNU Lesser General Public License v3.0
33 stars 12 forks source link

After build, it runs on a new system and cannot find the DLL #5

Closed Kojima648 closed 1 year ago

Kojima648 commented 2 years ago

It is normal for me to run on my development machine. Include running in editor

But after I build, the program cannot work normally when running on a new win 64 bit system. Please help me analyze the lo Player.log g

AugGust commented 2 years ago

If you installed it via the instructions in the readme (Add package from git URL...), there is a mistake with the package. The DLL you will get is the debug version, which relies on debug version of the VC runtime.

To fix, download the release version of the DLL in the repo, which only relies on VC runtime C++ 2015 redistributable. Close unity, replace the DLL and then open unity again, then build your project.

Ensure that any PC that is running your build now has the VC runtime redistributable installed

Kojima648 commented 2 years ago

图片

Do you mean this dll? Is this compiled in release mode?

AugGust commented 2 years ago

image

Kojima648 commented 2 years ago

okay, thank you. Maybe I can compile and release the release version myself.

Kojima648 commented 2 years ago

xcopy /y /d "$(OutDir)*.dll" "$(SolutionDir)..\Plugin\DLL"

It seems that "\" in front of " *.dll" here did not need "\", because Outdir had already brought "\"

图片

MrTimcakes commented 1 year ago

This is now fixed in v0.6.0, along with a sample of controlling the FFB from the inspector.