Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

BuildUtilities.RegisterShouldIncludeInBuildCallback

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

Switch to Manual

Declaration

public static void RegisterShouldIncludeInBuildCallback(PackageManager.IShouldIncludeInBuildCallback cb);

Parameters

cb Object of a class that implements the IShouldIncludeInBuildCallback interface.

Description

Registers a callback object for a package.

During a build operation, the Unity Package Manager invokes the IShouldIncludeInBuildCallback.ShouldIncludeInBuild method for each managed plugin (DLL) in the package whose name is IShouldIncludeInBuildCallback.PackageName. The callback implementation must return true for plugins that should be included in the build and false for plugins that should be excluded from the build.

Only one IShouldIncludeInBuildCallback callback object can be registered per package.