Documentation

Unity Engine


Unity Engine


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

Obsolete. The use of this function is not recommended. Consider using a more idiomatic ECS way to detect creation and destruction, like (enableable) tags and cleanup components.
Read time 1 minuteLast updated a day ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
Warning
Deprecated. Consider using a more idiomatic ECS way to detect creation and destruction, like (enableable) tags and cleanup components.
public JobHandle GetCreatedAndDestroyedEntitiesAsync(NativeList<int> state, NativeList<Entity> createdEntities, NativeList<Entity> destroyedEntities)

Parameters

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

createdEntities

The entities that were created.

destroyedEntities

The entities that were destroyed.

Returns

Type

Description

JobHandlea JobHandle for the job scheduled by this method.

Remarks

Detects the created and destroyed entities compared to last time the method was called with the given state. Entities must be fully destroyed, if cleanup 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.