DLL marked as "editor" in plugin inspector gets included in build

Hi,

I have a compiled DLL in the project (not under an Editor folder), but it is marked only for Editor in the plugin inspector.

This DLL gets included when i build the game.

Is this a bug? if not, how does the plugin inspector work (or, should work?)

I just reported this as a bug + sample project: (Case 728988) DLLs marked as “editor” in plugin inspector are included in build

Can someone plz have a look? :slight_smile:

Hey Liortal,

Does your dll have any real Editor code in it? If not that might be why Unity is including it anyway (which is weird). A fix might be to add the AssemblyIsEditorAssembly attribute.

Yes that assembly actually contains editor code…

And your build fails every time you go to build your project?

No… It builds just fine

If your editor code was being compiled your game would not build. Unity swaps your assemblies when you go to build. This includes removing the editor assembly. You can test this out by including the Unity Editor namespace at the top of one of your runtime classes

This is true for scripts that are being compiled. But this is an already compiled assembly…