docs.unity.cn
    Show / Hide Table of Contents

    Method Allocate

    Allocate<T>(ref BlobArray<T>, Int32)

    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.

    Int32 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>, Int32, Int32)

    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.

    Int32 length

    The number of elements to allocate.

    Int32 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.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023