# CollectDependencies

> Includes all dependencies.

## Definition

* **Type:** Field
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

> **Warning:**
>
> **Deprecated.** This has been made obsolete. It is always enabled in the new AssetBundle build system introduced in 5.0.

```csharp
CollectDependencies = 2
```

### Remarks

This follows all references to any assets, game objects or components and includes them in the build.

This flag is only taken into account when calling the obsolete [BuildPipeline.BuildAssetBundle](/engine/6000.0/script-reference/unityeditor/buildpipeline/buildassetbundle.md) method.  When calling [BuildPipeline.BuildAssetBundles](/engine/6000.0/script-reference/unityeditor/buildpipeline/buildassetbundles.md) this flag is ignored because references are always followed.
