文档

Unity Engine

Unity Engine

UnsafeAppendBuffer

Initializes and returns an instance of UnsafeAppendBuffer.
阅读时间1 分钟最后更新于 1 个月前

Definition

UnsafeAppendBuffer(int, int, AllocatorHandle)

Initializes and returns an instance of UnsafeAppendBuffer.
public UnsafeAppendBuffer(int initialCapacity, int alignment, AllocatorManager.AllocatorHandle allocator)

Parameters

initialCapacity

The initial allocation size in bytes of the internal buffer.

alignment

The byte alignment of the allocation. Must be a non-zero power of 2.

The allocator to use.

UnsafeAppendBuffer(void*, int)

Initializes and returns an instance of UnsafeAppendBuffer that aliases an existing buffer.
public UnsafeAppendBuffer(void* ptr, int length)

Parameters

The buffer to alias.

length

The length in bytes of the buffer.

Remarks

The capacity will be set to
length
, and UnsafeAppendBuffer.Length will be set to 0.