|
I've been working with plugins for some time now but recently I've encountered a problem I've not come across before. In the editor, I get a DLLNotFoundException the first time I try to start. After getting this error, if I stop and start again everything works fine. If I restart Unity then I get the same error on on the first time I run. In standalone this has the effect that the Dll is never found as every time you start the application is the first time. Anyone heard of this problem before? Any ideas as to what it could be? The Dll is definitely there and it does find it on subsequent runs in the editor. Thanks.
(comments are locked)
|
|
Right, caught it. Realised my mistake. The plugin in question has a a dependency on another Dll. It was that Dll which was causing the error. I needed to call a function of the dependent Dll first so that it is loaded before calling anything in my own Dll. I knew all this of course, I'd dealt with it before. Good to know. Can you give more hints on how you achieved that? Did you use This can be useful for people who will encounter the same issue.
Jul 16 '12 at 11:35 AM
Kryptos
In my case I'm still using DllImport: Both Dll's are placed in Assets/Plugins and I make sure so call I did not think about using
Jul 18 '12 at 09:39 AM
HazeTI
I'm not an expert with loading external resources. But it seams that DllImport is a generic method to load unmanaged code (from any DLL), whereas Assembly.LoadFrom only works with CLI-managed code (that could also be embedded inside a DLL).
Jul 18 '12 at 09:49 AM
Kryptos
(comments are locked)
|

Name of the not-found DLL?
Sorry, should've made it clear that it's my own plugin DLL that is causing the error. It is placed in Assets/Plugins and it is found & used correctly on subsequent runs.
I'm still having this issue, still a bit lost on what could be wrong. No one got any ideas?