# RegisterShouldIncludeInBuildCallback(IShouldIncludeInBuildCallback)

> Registers a callback object for a package.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.PackageManager](/engine/6000.6/script-reference/unityeditor/packagemanager.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Deprecated.** BuildUtilities is deprecated and will be removed in a later version, use PluginImporter.SetIncludeInBuildDelegate instead.

```csharp
public static void RegisterShouldIncludeInBuildCallback(IShouldIncludeInBuildCallback cb)
```

### Parameters

**** (\[IShouldIncludeInBuildCallback]\(/engine/6000.6/script-reference/unityeditor/packagemanager/ishouldincludeinbuildcallback)): Object of a class that implements the IShouldIncludeInBuildCallback interface.

### Remarks

During a build operation, the Unity Package Manager invokes the [IShouldIncludeInBuildCallback.ShouldIncludeInBuild](/engine/6000.6/script-reference/unityeditor/packagemanager/ishouldincludeinbuildcallback/shouldincludeinbuild.md) method for each managed plugin (DLL) in the package whose name is [IShouldIncludeInBuildCallback.PackageName](/engine/6000.6/script-reference/unityeditor/packagemanager/ishouldincludeinbuildcallback/packagename.md). 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](/engine/6000.6/script-reference/unityeditor/packagemanager/ishouldincludeinbuildcallback.md) callback object can be registered per package.
