So I'm trying to put my scripts and custom inspector editor scripts in two external DLLs and I'm facing a problem on my Editor DLL. First of, I'm using UnityVS with Visual Studio 2013 Ultimate.

I added a reference to C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.dll and it successfully shows me IntelliSense and I can access all classes and it's members, too. But when I try to compile the build, it will complain not finding the assembly UnityEditor. Even referencing the same DLL like the UnityProject (inside the Library folder) results in that problem, as it's just a copy of installed UnityEditor.dll.

Namespace not found after compiling

I even tried to open this project in a separate Visual Studio and build it, got the same result.

I've heard, placing the resulting DLL in the Editor folder will make the custom inspectors available, so I really wish this would compile.

  • \$\begingroup\$ Have you tried copying the DLL to somewhere in the assets folder in the project? \$\endgroup\$ – fastinvsqrt Dec 21 '14 at 16:27
  • \$\begingroup\$ What DLL? Due the error it will not compile and build the external DLL. The unity project is not affected with the problem directly. When it builds fine it would be copied to the Editor folder of my Assets folder by my post build event script, but I don't even get that far. \$\endgroup\$ – Martin Braun Dec 21 '14 at 17:13
  • \$\begingroup\$ The DLL that you are trying to reference (UnityEditor.dll). Try placing it somewhere in your assets folder. \$\endgroup\$ – fastinvsqrt Dec 21 '14 at 19:11
  • \$\begingroup\$ @fastinvsqrt I've put the UnityEditor.dll in Assets\Editor and referenced it in my external DLL project, the problem remains. \$\endgroup\$ – Martin Braun Dec 21 '14 at 19:38

My bad, I forgot to reference the right target framework in my Editor DLL.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.