docs.unity.cn
    Show / Hide Table of Contents

    Method CreateBlobAssetReference

    CreateBlobAssetReference<T>(Allocator)

    Completes construction of the blob asset and returns a reference to the asset in unmanaged memory.

    Declaration
    public BlobAssetReference<T> CreateBlobAssetReference<T>(Allocator allocator)
        where T : struct
    Parameters
    Type Name Description
    Allocator allocator

    The type of memory to allocate. Unless the asset has a very short life span, use Persistent.

    Returns
    Type Description
    BlobAssetReference<T>
    Type Parameters
    Name Description
    T

    The data type of the struct used to construct the asset's root. Use the same struct type that you used when calling ConstructRoot<T>().

    Remarks

    Use the BlobAssetReference<T> to access the blob asset. When the asset is no longer needed, callDispose() to destroy the blob asset and free its allocated memory.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, July 6, 2022
    Terms of use