EnsureCapacity(int)
Ensures that the buffer has at least the specified capacity.
阅读时间1 分钟最后更新于 19 天前
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public void EnsureCapacity(int length)
Parameters
The buffer capacity is ensured to be at least this big.
Remarks
If is greater than the current DynamicBuffer<T>.Capacity of this buffer and greater than the capacity reserved with InternalBufferCapacityAttribute, this function allocates a new memory block and copies the current buffer to it. The number of elements in the buffer remains unchanged.
length