docs.unity3d.com
    Show / Hide Table of Contents

    Method GetCreatedAndDestroyedEntitiesAsync

    GetCreatedAndDestroyedEntitiesAsync(NativeList<Int32>, NativeList<Entity>, NativeList<Entity>)

    Detects the created and destroyed entities compared to last time the method was called with the given state.

    Declaration
    public JobHandle GetCreatedAndDestroyedEntitiesAsync(NativeList<int> state, NativeList<Entity> createdEntities, NativeList<Entity> destroyedEntities)
    Parameters
    Type Name Description
    NativeList<Int32> state

    The same state list must be passed when you call this method, it remembers the entities that were already notified created and destroyed.

    NativeList<Entity> createdEntities

    The entities that were created.

    NativeList<Entity> destroyedEntities

    The entities that were destroyed.

    Returns
    Type Description
    JobHandle
    Remarks

    Entities must be fully destroyed, if system state components keep it alive it still counts as not yet destroyed. EntityCommandBuffer instances that have not been played back will have no effect on this until they are played back.

    Back to top
    Terms of use
    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