docs.unity3d.com
    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
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023