Auto-ASMDEF

2SD

(16)
$19
Publisher 2SD
File size 2.01MB
Number of files 48
Latest version 1.4b
Latest release date 2022-08-29 09:00:10
First release date 2019-10-31 07:16:11
Supported Unity versions 2018.4.2 or higher
Extensively tested on 2019LTS 2020LTS, and 2021LTS. 2022 support added in 1.4b!

Auto-ASMDEF provides an easy way to create assembly definition files to your entire project or to selected folders, in a way that resembles Unity's special compilation folders.

 

MANUAL

 

Why use assembly definition(or asmdef) files?
Using assembly definitions can speed up compilation times, because when set up properly you only have to recompile the part of your code that's changed - the most common scenario is you have a lot of assets from the store which clutter both your first and second passes, meaning whenever you change your own code you'll have to recompile those as well, even when they aren't changed at all, an essentially empty project with only a handful of popular assets can lead to even a minute long compilation each time when in reality you might only have a few thousand lines of code that needs to be recompiled.

 

So what's the catch?
Setting them up by hand can be extremely cumbersome. Each time you create a new asmdef file Unity will recompile, then when you add an assembly definition reference it has to recompile again. I set up a test project(with Playmaker, Behaviour Designer, Doozy UI, MasterAudio and EVP5 - so nothing crazy, I'm certain most of you have a similar setup even on day0), these required 487 asmref files - and not only that, you have to make sure you add them to the correct assembly(which as you might imagine can be a huge pain when you have to do it 487 times). But apart from that, even if I know exactly where to place the asmref files, and which assembly I want to target, in this case it took approximately 11 seconds to recompile my scripts, doing it 487 times would mean almost an hour and a half of waiting alone. Ouch.

 

Alright, so we ended up between a rock and a hard place, where to go from here?
Auto-ASMDEF solves these issues completely. You set a target directory you want to use for storing the created asmdef files, if you want to always include assemblies you can set them up here as well, you can set up the excluded folders if you want, then press a button and boom, done. It will automatically create the required asmdef files, and the references in each subfolder which contains a script, and at that point you only have to recompile those assemblies when you make a change to them(for example if you update them from the store).

 

The folder structure stays the same, your files won't be moved or changed in any way, only new ones will be created(and this whole process can be reversed with a single click as well if needed).

 

Requirement: 2019.2 and up(it relies on .asmref files which were added in an alpha version of 2019.2)

Top Publisher Assets