docs.unity3d.com
Search Results for

    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.

    GetComponentTypes(AllocatorHandle)

    Gets the types of the components making up this archetype.

    Declaration
    public NativeArray<ComponentType> GetComponentTypes(AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle 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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)