- Home /
DllNotFoundException in standalone
I had to do some native code and therefore built a c++ plugin for Unity. This plugin works like a charm in the editor but for standalone builds I get the below error. The dll in question has been placed in a /Plugins subfolder.
As this works in the editor, is there anything I need to set in order to get Unity to merge or copy the dll into the standalone build?
Platform assembly: C:\Users\ZackerAcer\Documents\ESE\builds\ese3_appup\ese3_appup_Data\Managed\UnityScript.Lang.dll (this message is harmless)
DllNotFoundException: AppUpYours/AppUpYours
at (wrapper managed-to-native) AppUpIntegrator:initialise ()
at AppUpIntegrator.Initialise () [0x00000] in <filename unknown>:0
at AppUpIntegrator.CheckAuthorization () [0x00000] in <filename unknown>:0
at gamefield.Start () [0x00000] in <filename unknown>:0
I think I'm having the same (or similar problem) in 5.3.4. I have a managed plugin that accesses native code through Interop. When I build the stand alone player, the managed plugin goes to the Data/$$anonymous$$anaged folder and the native plugin goes to the Data/Plugins folder. When I run the executable, the player can't find the native plugin. If I copy it (the native plugin) to the same directory as the executable, it works fine.
It's like the Unity app isn't searching in the Data/Plugins folder at all. Any suggestions?
Answer by luckruns0ut · Nov 29, 2011 at 09:12 PM
Im not sure whats going on, are u launching the game application from the same location as the game data? e.g test.exe needs to be with test_data
I'm having the same issue. Did you manage to solve it?
It's not the first time (by far) that I've used plugins in a Unity project, but it's the first time this error pops out. I really can't understand why everything works in the editor but not in the build... that's a head scratcher (and yes, the game data folder is correct, with the plugins there and all that)
Answer by sundog · Aug 30, 2012 at 01:00 PM
In my case, it works if I install my plugin DLL alongside the game's executable. It seems that the DLL search path isn't being set to include the plugins folder in the standalone deployment, but Windows always looks in the executable's folder for any DLL's that are trying to be loaded.
Your answer
Follow this Question
Related Questions
Import (mixed assembly) managed C++/CLI DLL plugin 0 Answers
Error building Player: Extracting referenced dlls failed. 1 Answer
Native c++ (mingw) plugin works in editor but not in build 1 Answer
DllNotFound Exception on Editor but works on Standalone 0 Answers
Why does my 32-bit dll plugin(c++) work in Unity 4 and not in Unity 5 indy (Windows 32-bit editor) 0 Answers