docs.unity.cn
    Show / Hide Table of Contents

    Method GetComponentTypes

    GetComponentTypes(Entity, Allocator)

    Gets an entity's component types.

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

    The entity.

    Allocator allocator

    The type of allocation for creating the NativeArray to hold the ComponentType objects.

    Returns
    Type Description
    NativeArray<ComponentType>

    An array of ComponentType containing all the types of components associated with the entity.

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