Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


assemblyCompilationNotRequired

Event invoked on the main thread during a compilation pass for each assembly that is already up to date and therefore doesn't need to be recompiled.
Read time 1 minuteLast updated 10 days ago

Definition

public static event Action<string> assemblyCompilationNotRequired

Remarks

A compilation pass can be triggered by modifying or reimporting scripts, entering Play mode, code reload, or when compilation is requested from code, such as via CompilationPipeline.RequestScriptCompilation.
During a compilation pass, Unity evaluates each assembly in the project to determine whether it needs to be recompiled. For each assembly in that pass:
  • If the assembly needs compiling, it gets compiled, and the CompilationPipeline.assemblyCompilationFinished event is invoked for that assembly.
  • If the assembly doesn't need compiling,
    assemblyCompilationNotRequired
    is invoked for that assembly's output path.
You can use
assemblyCompilationNotRequired
for tooling that hooks into the compilation pipeline and needs to track the state of every assembly during a pass, including assemblies that were skipped. For example:
  • Post-processing or instrumentation tools that operate on assembly outputs need to know which assemblies are present and current even if they weren't rebuilt this pass.
  • Build or asset pipelines that require the state of all assemblies after a compilation event.