Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

CompilationPipeline.assemblyCompilationNotRequired

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Parameters

Parameter Description
value Parameter is the output assembly path.

Description

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.

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.