What is it? Unity Package, which allows to create parallel hierarchy of .asmdef
compilation files. Through this package, you can setup huge amount of .asmdef files.
This package is UnityEditor only
Why? With HUGE amount of code, it's necessary to decompose all of this code to
separate systems. And one of the best way to do this - with .asmdef files. In this way, you can
architect your project with more flexibility and incapsulation of logic. But default interface for .asmdef
files is not great for that. This package solve this problem
I have several reasons, why you should use it, instead of default .asmdef
- This is overhead for
.asmdef, you still works with.asmdef, but with improvements - It automates manual linking of many
.asmdeffiles. On default.asmdef, with every new project.asmdef, you must think to link it manually. With this solution - you just need to createAssemblyBuilderand add links to otherAssemblyBuilder
How to install it?
- Via UPM (git url) -
https://github.com/vertoker/assemblybuilder.git?path=/Assets/AssemblyBuilder - Via
manifest.json- add new line"com.vertoker.assemblybuilder": "https://github.com/vertoker/assemblybuilder.git?path=/Assets/AssemblyBuilder" - Via
git clone(if you want to contribute here) -git clone https://github.com/vertoker/assemblybuilder.git - Via
.ziparchive - just download package manually, extract and move to your project intoAssets/Pluginsconcrete folderAssets/AssemblyBuilder
How to work with it?
- Create new / Select existed
.asmdeffile - Create new
AssemblyBuilderasset (Scripting/AssemblyBuilder/...) - Add selected
.asmdeffile into newAssemblyBuilder - Add
parentsinto thisAssemblyBuilder - (optional) Add into overall
AssemblyBuilderCollectionasset - Click button
Build
What you should know
- Use
readonlyoption for builder, which.asmdeffiles you don't want to change. It's usually files fromupmand other external packages in project itself - Use
public parentsandprivate parentsto create incapsulation in your inheritance tree. Even.asmdeffiles must have dependencies, which other.asmdeffiles should doesn't know about - Use
public parentsby default AssemblyBuilderallows to add several.asmdeffiles, but recommendation: use uniqueAssemblyBuilderfor every.asmdeffileAssemblyBuilderalso can be used without.asmdeffile, in inheritance recursion, it uses as group of otherAssemblyBuilder's, just add it intopublic parents- Use several
AssemblyBuilderCollectionassets, to collect allAssemblyBuilderassets in your project. This allows to setup all dependencies with singleBuildclick - At the current moment, it changes only
referencesfield in.asmdeffiles, therefore everything else must be setup manually (but it can be changed)
This package is in development, I open to any MR that you sent to project