docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method DestroyEntity

    DestroyEntity(NativeArray<Entity>)

    Destroys all entities in an array.

    Declaration
    public void DestroyEntity(NativeArray<Entity> entities)
    Parameters
    Type Name Description
    NativeArray<Entity> entities

    An array containing the Entity objects of the entities to destroy.

    Remarks

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before destroying the entity. No additional jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework might not be able to use the processing power of all available cores.

    DestroyEntity(NativeSlice<Entity>)

    Destroys all entities in a slice of an array.

    Declaration
    public void DestroyEntity(NativeSlice<Entity> entities)
    Parameters
    Type Name Description
    NativeSlice<Entity> entities

    The slice of an array containing the Entity objects of the entities to destroy.

    Remarks

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before destroying the entity. No additional jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework might not be able to use the processing power of all available cores.

    DestroyEntity(Entity)

    Destroys an entity.

    Declaration
    public void DestroyEntity(Entity entity)
    Parameters
    Type Name Description
    Entity entity

    The Entity object of the entity to destroy.

    Remarks

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before destroying the entity. No additional jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework might not be able to use the processing power of all available cores.

    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)