Quantcast
Channel: Questions in topic: "native plugin"
Viewing all articles
Browse latest Browse all 376

Reloading native plugins

$
0
0
Hi I'm developing a plugin for a project. To give a bit of context its a tool for generating assets in the editor, and needs c++ to voxelise efficiently. However, I've rapidly hit upon the issue that once Unity loads a DLL, it won't unload (or even release) it without restarting Unity. This makes development of the native plugin insanely slow, as in order to make a change and test it I have to change, close unity, build, open unity, test etc. Not a nice dev cycle! Has anybody hit upon this and found any nice solutions. The best I can think of is to use an approach like this one: http://blogs.msdn.com/b/jonathanswift/archive/2006/10/03/dynamically-calling-an-unmanaged-dll-from-.net-_2800_c_23002900_.aspx Loading the DLL dynamically when in the editor. I could even take temporary copies and detect when the source DLL reloaded, giving me a 'live update' style system. However that'd mean defining the function linkage differently depending on whether you were in editor or not, which is a pain! Any thoughts? Thanks -Chris

Viewing all articles
Browse latest Browse all 376

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>