Is there a way to put custom editor scripts in DLLs?

I would like to put custom editor scripts into DLLs in order to improve sharing among projects, is there a way to do this?

1 Answer

1

Sure. Just create a “Class library” MonoDevelop/VisualStudio/Whatever project, add a reference to the needed Unity libraries (UnityEngine if you’re doing game stuff, UnityEditor if doing editor stuff), and start creating your scripts. Then you can just place the compiled DLL into your Unity Assets folder to use it.

If your DLL is only for use from editor code (and it contains "using UnityEditor") then you can put the DLL itself in an Editor folder, the same way you would for editor scripts.