docs.unity3d.com
    Show / Hide Table of Contents

    Method RemoveComponent

    RemoveComponent<T>(Entity)

    Declaration
    public void RemoveComponent<T>(Entity e)
    Parameters
    Type Name Description
    Entity e
    Type Parameters
    Name Description
    T

    RemoveComponent(Entity, ComponentType)

    Declaration
    public void RemoveComponent(Entity e, ComponentType componentType)
    Parameters
    Type Name Description
    Entity e
    ComponentType componentType

    RemoveComponent(Entity, ComponentTypes)

    Records a command to remove one or more components from an entity.

    Declaration
    public void RemoveComponent(Entity e, ComponentTypes componentTypes)
    Parameters
    Type Name Description
    Entity e

    The entity to have components removed.

    ComponentTypes componentTypes

    The types of components to remove.

    RemoveComponent(EntityQuery, ComponentTypes)

    Records a command to remove one or more components from all entities matching a query.

    Declaration
    public void RemoveComponent(EntityQuery entityQuery, ComponentTypes componentTypes)
    Parameters
    Type Name Description
    EntityQuery entityQuery

    The query specifying which entities to remove the components from.

    ComponentTypes componentTypes

    The types of components to remove.

    Remarks

    The query is performed at playback time, not when the method is called.

    RemoveComponent(EntityQuery, ComponentType)

    Records a command to remove a component from all entities matching a query.

    Declaration
    public void RemoveComponent(EntityQuery entityQuery, ComponentType componentType)
    Parameters
    Type Name Description
    EntityQuery entityQuery

    The query specifying which entities from which the component is removed.

    ComponentType componentType
    Remarks

    The query is performed at playback time, not when the method is called.

    RemoveComponent<T>(EntityQuery)

    Records a command to remove a component from all entities matching a query.

    Declaration
    public void RemoveComponent<T>(EntityQuery entityQuery)
    Parameters
    Type Name Description
    EntityQuery entityQuery

    The query specifying which entities from which the component is removed.

    Type Parameters
    Name Description
    T

    The type of component to remove.

    Remarks

    The query is performed at playback time, not when the method is called.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023