docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateArchetype

    CreateArchetype(params ComponentType[])

    Creates an archetype from a set of component types.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed array")]
    public EntityArchetype CreateArchetype(params ComponentType[] types)
    Parameters
    Type Name Description
    ComponentType[] types

    The component types to include as part of the archetype.

    Returns
    Type Description
    EntityArchetype

    The EntityArchetype object for the archetype.

    Remarks

    Creates a new archetype in the ECS framework's internal type registry, unless the archetype already exists.

    CreateArchetype(ReadOnlySpan<ComponentType>)

    Creates an archetype from a set of component types.

    Declaration
    public EntityArchetype CreateArchetype(ReadOnlySpan<ComponentType> types)
    Parameters
    Type Name Description
    ReadOnlySpan<ComponentType> types

    The component types to include as part of the archetype.

    Returns
    Type Description
    EntityArchetype

    The EntityArchetype object for the archetype.

    Remarks

    Creates a new archetype in the ECS framework's internal type registry, unless the archetype already exists.

    CreateArchetype(NativeArray<ComponentType>)

    Creates an archetype from a set of component types.

    Declaration
    public EntityArchetype CreateArchetype(NativeArray<ComponentType> types)
    Parameters
    Type Name Description
    NativeArray<ComponentType> types

    The component types to include as part of the archetype.

    Returns
    Type Description
    EntityArchetype

    The EntityArchetype object for the archetype.

    Remarks

    Creates a new archetype in the ECS framework's internal type registry, unless the archetype already exists.

    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)