How to add a conditional editor dependency in assembly definition file?

I have code that uses compiler directives:

#ifdef UNITY_EDITOR
    // Editor code here
#endif

I am creating an assembly definition file on the folder of this code but I need a dependency on an editor only assembly. I need some kind of #ifdef UNITY_EDITOR but on the assembly level. Is this possible?

You can reference editor only assemblies fine with runtime assemblies. They just won’t be included in a build.

1 Like

Oh really? That’s cool then.