文档

Unity Engine

Unity Engine

CreateBlobAssetReference<T>(AllocatorHandle)

Completes construction of the blob asset and returns a reference to the asset in unmanaged memory.
阅读时间1 分钟最后更新于 19 天前

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.