docs.unity.cn
    Show / Hide Table of Contents

    Method AddComponent

    AddComponent<T>(Int32, Entity, T)

    Declaration
    public void AddComponent<T>(int sortKey, Entity e, T component)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    Int32 sortKey
    Entity e
    T component
    Type Parameters
    Name Description
    T

    AddComponent<T>(Int32, Entity)

    Declaration
    public void AddComponent<T>(int sortKey, Entity e)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    Int32 sortKey
    Entity e
    Type Parameters
    Name Description
    T

    AddComponent(Int32, Entity, ComponentType)

    Declaration
    public void AddComponent(int sortKey, Entity e, ComponentType componentType)
    Parameters
    Type Name Description
    Int32 sortKey
    Entity e
    ComponentType componentType

    AddComponent(Int32, Entity, ComponentTypes)

    Records a command to add one or more components to an entity.

    Declaration
    public void AddComponent(int sortKey, Entity e, ComponentTypes types)
    Parameters
    Type Name Description
    Int32 sortKey
    Entity e

    The entity to get additional components.

    ComponentTypes types

    The types of components to add.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Friday, May 28, 2021