Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Organizing scripts into assemblies

Information about assembly definitions, which you can use to organize the scripts in your project.
Read time 1 minuteLast updated 4 days ago

Assemblies are individual units of compiled code that group types and resources together. Organizing scripts into assemblies has important advantages, especially as your codebase grows.
Assemblies help you think clearly about the architecture of your code and about managing dependencies. By exercising fine-grained control over references, you can reduce unnecessary recompilation time and make your code easier to debug.

Topic

Description

Introduction to assemblies in UnityUnderstand the fundamentals of how assemblies work in Unity and why using them to organize your scripts is beneficial.
Creating assembly assetsCreate various kinds of assembly assets to customize your assemblies.
Referencing assembliesSet up references between assemblies, override the default references and understand the limitations Unity places on references.
Conditionally including assembliesUse scripting symbols to conditionally include or exclude assemblies from compilation.
Assembly metadata and compilation detailsDefine metadata for your assemblies.
Assembly Definition Inspector window referenceInspector-editable properties of assembly defintion assets and their meaning.
Assembly Definition Reference Inspector window referenceInspector-editable properties of assembly defintion reference assets and their meaning.
Assembly Definition file format referenceAssembly definition file format reference.
Predefined assemblies referenceUnity's predefined assemblies and the order in which Unity compiles them.

Additional resources