- Home /
Developing with external unmanged dll's
Does anyone know a method for unlocking used dll in the unity editor? I'm developing a c++ dll which i'm including in my projects "Plugins" folder, but every time I want to update my c++ dll in my project, I have to close the editor before I can delete the old and copy in a new.
I don't think there is a way around restarting the editor, but I too am hoping that there is a solution...
But it's only after the code using the dll is executed in the editor. You can overwrite your dll till the cows come home for game run-time dlls up until you hit play in the editor, then it locks it even after you hit stop and you need to restart in order to overwrite it.
There likely won't ever be support for this. We ran into a similar issue with our internal engine - you can't be sure the library doesn't have open file handles or threads that it would leak if you suddenly detatched it from the process.
You could try something like Unlocker -- http://ccollomb.free.fr/unlocker/
Answer by jonas-echterhoff · Nov 22, 2010 at 03:44 PM
As other mentioned, this is not possible right now, and likely won't be any time soon, since we don't know if the dll is in a state where it can be unloaded without leaking anything (though it would be possible to expose mechanisms for that).
What you could do though would be to implement this yourself by creating a "wrapper" dll which loads and unloads the actual dll you want to use.