# BuildPipelineContext

> Defines the build context for IProcessSceneWithReport during a build event.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Build](/engine/6000.7/script-reference/unityeditor/build.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static class BuildPipelineContext
```

## Remarks

This class contains static methods for declaring additional scene dependencies for the build system. These dependencies are used to trigger scene rebuilds in cases where dependencies are not explicit in the scene itself.

For example, if the implementation of [IProcessSceneWithReport](/engine/6000.7/script-reference/unityeditor/build/iprocessscenewithreport.md) loads an Asset programmatically then [BuildPipelineContext.DependOnAsset](/engine/6000.7/script-reference/unityeditor/build/buildpipelinecontext/dependonasset.md) should be called, unless the same Asset is also referenced by the Scene. Then, if the Asset is changed and the build run again, Unity will retrigger the callback and save the latest scene state instead of reusing an out-of-date cached result.

Dependency tracking applies to [BuildPipeline.BuildContentDirectory](/engine/6000.7/script-reference/unityeditor/buildpipeline/buildcontentdirectory.md). It does not apply to [BuildPipeline.BuildPlayer](/engine/6000.7/script-reference/unityeditor/buildpipeline/buildplayer.md) or [BuildPipeline.BuildAssetBundles](/engine/6000.7/script-reference/unityeditor/buildpipeline/buildassetbundles.md) .

Additional Resources: [AssetDatabase.LoadAssetAtPath](/engine/6000.7/script-reference/unityeditor/assetdatabase/loadassetatpath.md)

## Static Methods

| Method                                                                                                   | Description                                                                                    |
| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [DependOnAsset](/engine/6000.7/script-reference/unityeditor/build/buildpipelinecontext/dependonasset.md) | Allows you to specify that a Scene depends on contents of an asset directly provided.          |
| [DependOnPath](/engine/6000.7/script-reference/unityeditor/build/buildpipelinecontext/dependonpath.md)   | Allows you to specify that a Scene depends on contents of a source asset at the provided path. |
