Method Allocate
Allocate<T>(ref BlobArray<T>, int)
Allocates enough memory to store length
elements of struct T
.
Declaration
public BlobBuilderArray<T> Allocate<T>(ref BlobArray<T> ptr, int length) where T : struct
Parameters
Type | Name | Description |
---|---|---|
BlobArray<T> | ptr | A reference to a BlobArray field in a blob asset. |
int | length | The number of elements to allocate. |
Returns
Type | Description |
---|---|
BlobBuilderArray<T> | A reference to the newly allocated array as a mutable BlobBuilderArray instance. |
Type Parameters
Name | Description |
---|---|
T | The struct data type. |
Allocate<T>(ref BlobArray<T>, int, int)
Allocates enough memory to store length
elements of struct T
.
Declaration
public BlobBuilderArray<T> Allocate<T>(ref BlobArray<T> ptr, int length, int alignment) where T : struct
Parameters
Type | Name | Description |
---|---|---|
BlobArray<T> | ptr | A reference to a BlobArray field in a blob asset. |
int | length | The number of elements to allocate. |
int | alignment | The alignment of the allocated memory. |
Returns
Type | Description |
---|---|
BlobBuilderArray<T> | A reference to the newly allocated array as a mutable BlobBuilderArray instance. |
Type Parameters
Name | Description |
---|---|
T | The struct data type. |
Allocate<T>(ref BlobPtr<T>)
Allocates enough memory to store a struct of type T
.
Declaration
public ref T Allocate<T>(ref BlobPtr<T> ptr) where T : struct
Parameters
Type | Name | Description |
---|---|---|
BlobPtr<T> | ptr | A reference to a blob pointer field in a blob asset. |
Returns
Type | Description |
---|---|
T | A reference to the newly allocated struct. |
Type Parameters
Name | Description |
---|---|
T | The struct data type. |