Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RegisterShouldIncludeInBuildCallback(IShouldIncludeInBuildCallback)

Registers a callback object for a package.
Read time 1 minuteLast updated 10 days ago

Definition

Warning
Deprecated. BuildUtilities is deprecated and will be removed in a later version, use PluginImporter.SetIncludeInBuildDelegate instead.
public static void RegisterShouldIncludeInBuildCallback(IShouldIncludeInBuildCallback cb)

Parameters

Object of a class that implements the IShouldIncludeInBuildCallback interface.

Remarks

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.