Following discussion in the Gossip forum, I created a small test project (attached below) to see if custom editors and editor windows could be made to work when bundled in a .NET assembly (DLL). Here is what I found:
- A MonoBehaviour component can be included in a DLL
- A MonoBehaviour component in a DLL can be created via GameObject.AddComponent()
- GameObject.AddComponent() can be called from a class in a DLL
- Unity is not able to instantiate a custom editor from a DLL (“no script with that name”)
- Unity is not able to instantiate an editor window from a DLL (“no script with that name”)
- Unity is able to load/execute code from a DLL linked with UnityEditor.dll, though
This seems inconsistent with the 3.1 release note claim that any code may now by migrated into a DLL. It’s possible that I have missed a required step in configuring/compiling/deploying the DLLs, but the error messages received within Unity (the dreaded “no script with that name” error) is consistent with the prior behaviour.
I’ve submitted this as a bug, Case 382505, and linked this support thread from the original Gossip forum discussion. Any feedback, either from Unity or another member of the community that has got this working, would be much appreciated.