文档

Unity Engine

Unity Engine

TryAllocateBlock<T>(out Block, int)

Allocates a block from this allocator.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

TryAllocateBlock<T>(Block, int)

public int TryAllocateBlock<T>(out AllocatorManager.Block block, int items) where T : unmanaged

Parameters

block

Outputs the allocated block.

items

The number of values to allocate for.

Returns

Type

Description

int0 if successful. Otherwise, returns the error code from the allocator function.