Struct BlobArray<T> | Entities | 0.7.0-preview.19
docs.unity3d.com
    Show / Hide Table of Contents

    Struct BlobArray<T>

    An immutable array of value types stored in a blob asset.

    Namespace: Unity.Entities
    Syntax
    public struct BlobArray<T>
        where T : struct
    Type Parameters
    Name Description
    T

    The data type of the elements in the array. Must be a struct or other value type.

    Remarks

    When creating a blob asset, use the BlobBuilderArray<T> provided by a BlobBuilder instance to set the array elements.

    Properties

    Item[Int32]

    The element of the array at the index position.

    Declaration
    public T this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index

    The array index.

    Property Value
    Type Description
    T
    Remarks

    The array element is a reference return.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if index is out of bounds.

    Length

    The number of elements in the array.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    Int32

    Methods

    GetUnsafePtr()

    Provides an unsafe pointer to the array data.

    Declaration
    public void *GetUnsafePtr()
    Returns
    Type Description
    Void*

    An unsafe pointer.

    Remarks

    You can only use unsafe pointers in contexts.

    ToArray()

    Declaration
    public T[] ToArray()
    Returns
    Type Description
    T[]

    See Also

    BlobBuilder
    Back to top
    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