---
title: SetBlobAsset<T>(BlobAssetReference<T>, int)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/blobobject/setblobasset
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/blobobject/setblobasset.md
last_updated: 2026-11-07
generated_at: 2026-11-11T14:38:25.418Z
locale: en-us
---

# SetBlobAsset<T>(BlobAssetReference<T>, int)

> Replaces the data stored in this object with a copy of a blob asset.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
public void SetBlobAsset<T>(BlobAssetReference<T> blobAssetReference, int version = 0) where T : unmanaged
```

### Parameters

**** (\[BlobAssetReference\<T>]\(/engine/7000.0/script-reference/unity/entities/blobassetreference1)): The blob asset to copy. If its `IsCreated` property is `false`, the object becomes empty.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The version of the layout of `T`. To read the data back, pass the same version to `AcquireReference`. The default value is 0.

### Remarks

The object stores a copy of the blob, so you can dispose `blobAssetReference` after the call. The object also stores the type of `T` and the version, and [BlobObject.AcquireReference](/engine/7000.0/script-reference/unityengine/blobobject/acquirereference.md) returns a valid reference only for the same type and version.

Call this method from the main thread. References that you acquired earlier keep pointing to the previous data until you dispose them.
