Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

BlobBuilder.Allocate

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public BlobBuilderArray<T> Allocate(ref BlobArray`1 ptr, int length);

Parameters

Parameter Description
ptr A reference to a BlobArray field in a blob asset.
length The number of elements to allocate.

Returns

BlobBuilderArray<T> A reference to the newly allocated array as a mutable BlobBuilderArray instance.

Description

Allocates enough memory to store length elements of struct T.


Declaration

public BlobBuilderArray<T> Allocate(ref BlobArray`1 ptr, int length, int alignment);

Parameters

Parameter Description
ptr A reference to a BlobArray field in a blob asset.
length The number of elements to allocate.
alignment The alignment of the allocated memory.

Returns

BlobBuilderArray<T> A reference to the newly allocated array as a mutable BlobBuilderArray instance.

Description

Allocates enough memory to store length elements of struct T.


Declaration

public ref T Allocate(ref BlobPtr`1 ptr);

Parameters

Parameter Description
ptr A reference to a blob pointer field in a blob asset.

Returns

T A reference to the newly allocated struct.

Description

Allocates enough memory to store a struct of type T.