# BuildReferenceMap

> Container for holding information about where objects will be serialized in a build.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Build.Content](/engine/6000.6/script-reference/unityeditor/build/content.md)
* **Assembly:** UnityEditor.CoreModule
* **Implements:** [ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable), [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public class BuildReferenceMap : ISerializable, IDisposable
```

## Remarks

This class helps ensure that Object references can be correctly resolved in the final built data.

Note: this class and its members exist to provide low-level support for the **Scriptable Build Pipeline** package. This is intended for internal use only; use the [Scriptable Build Pipeline package](https://docs.unity3d.com/Packages/com.unity.scriptablebuildpipeline@latest/index.html) to implement a fully featured build pipeline. You can install this via the [Package Manager window](/engine/6000.6/manual/packages-list/upm-ui-window/upm-ui.md).

## Constructors

| Constructor                                                                                                                                                                                                                                                    | Description                                         |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [BuildReferenceMap()](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/ctor.md#buildreferencemap\(\))                                                                                                                               | Default constructor for an empty BuildReferenceMap. |
| [BuildReferenceMap(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/ctor.md#buildreferencemap\(serializationinfo-streamingcontext\)) | Default constructor for an empty BuildReferenceMap. |

## Methods

| Method                                                                                                          | Description                                                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AddMapping](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/addmapping.md)         | Adds a mapping for a single Object to where it will be serialized out to the build.                                                                                                                                                   |
| [AddMappings](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/addmappings.md)       | Adds mappings for a set of Objects to where they will be serialized out to the build.                                                                                                                                                 |
| [Dispose](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/dispose.md)               | Dispose the BuildReferenceMap destroying all internal state.                                                                                                                                                                          |
| [Equals](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/equals.md)                 | Returns true if the objects are equal.                                                                                                                                                                                                |
| [FilterToSubset](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/filtertosubset.md) | Filters this BuildReferenceMap instance to remove references to any objects that are not in the array of [ObjectIdentifier](/engine/6000.6/script-reference/unityeditor/build/content/objectidentifier.md)s specified by `objectIds`. |
| [GetHash128](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/gethash128.md)         | Gets the hash for the BuildReferenceMap.                                                                                                                                                                                              |
| [GetHashCode](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/gethashcode.md)       | Gets the hash code for the BuildReferenceMap.                                                                                                                                                                                         |
| [GetObjectData](/engine/6000.6/script-reference/unityeditor/build/content/buildreferencemap/getobjectdata.md)   | ISerializable method for serialization support outside of Unity's internal serialization system.                                                                                                                                      |
