- Home /
Releasing plugin in script
Hi,
I'm currently working on a native code plugin, based on the template found on [1]. What I'm noticing is, that when I build the dll in Visual Studio and try to copy it into the target plugin folder within the Unity Asset folder, once I ran the project in the editor and thus accessed the plugin in my C# script, Unity locks the file forever and I'm not able to overwrite it. What I have to do is shut Unity down and restart. This is quite annoying to say the least. Is there a way of letting go the plugin in, say, the C# script's OnDisable or something?
Thanks, iko
[1] http://docs.unity3d.com/Manual/NativePluginInterface.html
Well, I ran into this [2] now, however it doesn't seem to do the job for me, since I noticed UnityPluginLoad doesn't get called, which I suppose I cannot call by myself but has to be called from inside the engine, due to the required IUnityInterfaces argment. Any ideas how I can get this to work?