-
Notifications
You must be signed in to change notification settings - Fork 0
Assembly Definitions
By default, Unity compiles almost all Project scripts into the Assembly-CSharp.dll
managed assembly. Unity must then recompile every script in the entire Project when you change any script.
When you create an Assembly Definition Asset in a folder, Unity compiles a separate managed assembly from all the scripts in that folder.
You can use Assembly Definition Reference Assets to add additional folders to an existing Assembly Definition asset.
Unity compiles scripts in Editor into Assembly-CSharp-Editor assembly.
However, if there is an Assembly Definition Asset in a dir that contains an Editor, scripts will go into the new assembly — where they might not belong.
Add an Assembly Definition Asset to each Editor folder and set the Platform property of that assembly so it is only used for the Editor Platform.
{
"name": "MyLibrary",
"references": [
"Utility",
"GUID:0ec2b662ccc592241854c1b507df8a89"
],
"includePlatforms": ["Android", "iOS"],
"excludePlatforms": ["WebGL"]
}
A precompiled assembly is a library compiled outside your Unity Project. By default, assemblies you define in your Project reference all the precompiled assemblies you add to the Project.
Specify whether all predefined assemblies should reference this assembly. When you enable this property, the predefined assemblies reference all assemblies defined in the Project, which matches how predefined assemblies reference precompiled assemblies (plug-ins).
When you disable the Auto Reference setting on a file, Unity does not automatically reference the file during compilation.
This has no effect on whether Unity includes it in the build.
When you enable this property, Unity does not add references to UnityEditor or UnityEngine when it compiles the assembly.
Set the platform compatibility of the assembly. Unity only compiles or references this assembly on the included (or not excluded) platforms.