Search Unity

DLL works in Editor, not in built app; built app is looking for DLL in wrong place.

Discussion in 'Editor & General Support' started by Dreamwriter, Jan 11, 2017.

  1. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    I have this really odd issue. I am using this AudioClip-to-MP3 Unity package.

    https://github.com/BeatUpir/Unity3D-save-audioClip-to-MP3

    First weird thing you'll note is the package doesn't include a .dll, but it uses it anyways. And it works without a .dll! ...but only in the Unity Editor. When run in a built-app, I get the message

    "Fallback handler could not load library C:/Blah/AudioTest_Data/Mono/libmp3lame.dll" (eventually followed by DllNotFoundException: libmp3lame.dll)

    If I download that .dll and put it in a plugins folder, I still get the message, though now the .dll is being installed into the built project in /Plugins. If I manually copy the .dll into the /Mono folder after making a build, it all works perfectly! ...but that's not something I should be required to do, the /Plugins folder is there for this exact reason.

    Any ideas how to fix this? How is it using a .dll in the editor that doesn't exist, and how do we get it to look in the /Plugins folder for the .dll rather than /Mono?
     
    Last edited: Jan 11, 2017