docs.unity.cn
    Show / Hide Table of Contents

    Method GetComponentTypes

    GetComponentTypes(Allocator)

    Gets the types of the components making up this archetype.

    Declaration
    public NativeArray<ComponentType> GetComponentTypes(Allocator allocator = Allocator.Temp)
    Parameters
    Type Name Description
    Allocator allocator

    The allocation type to use for the returned NativeArray.

    Returns
    Type Description
    NativeArray<ComponentType>

    A native array containing the ComponentType objects of this archetype.

    Remarks

    The set of component types in an archetype cannot change; adding components to an entity or removing components from an entity changes the archetype of that entity (possibly resulting in the creation of a new archetype). The original archetype remains unchanged.

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