Asset Store
Short manual explaining what, how and why
Auto-ASMDEF will set up assembly definition files for your entire project(or selected folders) in a fast, and extremely convenient way.
Assembly definitions work really well as long as you don’t have to include 3rd party assets that don’t utilize them. Setting up one asset isn’t so bad(unless it has a weird folder structure, usually with multiple Editor folders scattered around), but when you have like 30 - it can be a day’s worth of work,
and you spend most of that time waiting for Unity to recompile, it’s an absolute nightmare - so I came up with a solution for this specific problem.
We don’t care about which assembly they end up in, we don’t need nor want to know what’s going on in the background, we just don’t want to recompile stuff we don’t have to and maybe we want to get access to that code - but that’s it. Auto-ASMDEF does exactly that. After essentially a click of a button you end up with an ASMDEF setup that resembles Unity’s special folders structure, like so
What was in Unity’s FirstPassRuntime assembly will end up in Auto-ASMDEF-FirstPassRuntime assembly, what was in FirstPassEditor will end up in Auto-ASMDEF-FirstPassEditor, and so on - meaning this is completely backward-compatible, you don’t have to set up your project in a special way, put your assets in special folders or anything like that. If it worked before Auto-ASMDEF then it’ll work after that as well - except it will compile faster.
This also means referencing those assemblies is simple and straightforward(since it won’t clutter your project with ASMDEF files, there is only 4 at most(depending on your project, if you only have scripts in the FirstPass then it’ll only create one)). In fact you don’t even have to reference them manually, if everything is in a custom assembly except your own code then your code will be compiled after those by default - but it’s a good practice to do so.
And of course if anything goes wrong(like you forgot to reference an assembly you want to access from code, or maybe just imported another asset) you can also revert the changes with a click of a button.
I know a lot of people like to follow videos instead so I made one, going into detail about what ASMDEF files are to begin with, following with a step by step guide about how to use Auto-ASMDEF - I’m not used to talking in videos and it shows, if you prefer text over voice let me know and I’ll make another one
Updated(1.2) setup guide
Original setup guide(I’ll leave this here as I went into detail about what asmdef files are, why you should use them and what not)
Requires 2019.2(as it relies on assembly reference files)




