CreateBlobAssetReference<T>(AllocatorHandle)
Completes construction of the blob asset and returns a reference to the asset in unmanaged memory.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public BlobAssetReference<T> CreateBlobAssetReference<T>(AllocatorManager.AllocatorHandle allocator) where T : unmanaged
Parameters
The type of memory to allocate. Unless the asset has a very short life span, use Allocator.Persistent.
Returns
Type | Description |
|---|---|
| BlobAssetReference<T> | Returns a reference to the blob asset in unmanaged memory. |
Remarks
Use the BlobAssetReference<T> to access the blob asset. When the asset is no longer needed, callBlobAssetReference<T>.Dispose to destroy the blob asset and free its allocated memory.