- Home /
Locking assembly reloading in editor
I have some problem with some assemblies (ZMQ, Awesomium...) that don't like being continuously unloaded and reloaded as the project evolves. These assemblies ideally should be loaded in memory and remain there, no dynamic reloading for them as they don't support it properly.
It is fine to use this kind of libs in applications. However, it is really a pain to develop with this libraries because the editor is regularly crashing.
I noticed the crash are more likely to happen when the editor is in playmode and some modifications are done in the code. Thus I would like to avoid the assembly reloading during game execution. I tried to use
LockReloadAssemblies() / UnlockReloadAssemblies() in comination with OnPlayStateChange... But, even after having called LockReloadAssemblies() the assembly are still reloaded, so the call to the function does not work, maybe because it is for a too long period of time, or maybe simply because the gameloading require to load assemblies and that unity don't know how to keep some assemblies in memory and reload only certain one.
As anyone had similar issues and has found a work-around ? / Are other persons interested in this feature / Encountering similar crash ?
Thanks all !
Bertrand
I'm just guessing - but I'd bet the AppDomain is loaded and unloaded during the switch to run mode - pretty much no way around that apart from locking them somewhere else and I'm not sure how you'd do that - maybe load them and lock them in an Editor class?