Documentation

Unity Engine


Unity Engine


MoveEntitiesFrom

Moves all entities managed by the specified EntityManager to the world of this EntityManager.
Read time 7 minutesLast updated a day ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

MoveEntitiesFrom(EntityManager)

Moves all entities managed by the specified EntityManager to the world of this EntityManager.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(EntityManager srcEntities)

Parameters

srcEntities

The EntityManager whose entities are appropriated.

Remarks

The entities moved are owned by this EntityManager.
Each EntityManager.World has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(NativeArray<Entity>, EntityManager)

Moves all entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(out NativeArray<Entity> output, EntityManager srcEntities)

Parameters

An array to receive the Entity objects of the transferred entities.

srcEntities

The EntityManager whose entities are appropriated.

Remarks

After the move, the entities are managed by this EntityManager. Use the
output
array to make post-move changes to the transferred entities.
Each world has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(NativeArray<Entity>, EntityManager, NativeArray<EntityRemapInfo>)

Moves all entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(out NativeArray<Entity> output, EntityManager srcEntities, NativeArray<EntityRemapUtility.EntityRemapInfo> entityRemapping)

Parameters

An array to receive the Entity objects of the transferred entities.

srcEntities

The EntityManager whose entities are appropriated.

A set of entity transformations to make during the transfer.

Remarks

After the move, the entities are managed by this EntityManager. Use the
output
array to make post-move changes to the transferred entities.
Each world has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(EntityManager, NativeArray<EntityRemapInfo>)

Moves all entities managed by the specified EntityManager to the EntityManager.World of this EntityManager.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(EntityManager srcEntities, NativeArray<EntityRemapUtility.EntityRemapInfo> entityRemapping)

Parameters

srcEntities

The EntityManager whose entities are appropriated.

A set of entity transformations to make during the transfer.

Remarks

After the move, the entities are managed by this EntityManager.
Each World has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one world to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(EntityManager, EntityQuery)

Moves a selection of the entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(EntityManager srcEntities, EntityQuery filter)

Parameters

srcEntities

The EntityManager whose entities are appropriated.

A EntityQuery that defines the entities to move. Must be part of the source World. This query must not reference any types that implement IEnableableComponent.

Remarks

After the move, the entities are managed by this EntityManager. Use the
output
array to make post-move changes to the transferred entities.
Each world has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(NativeArray<Entity>, EntityManager, EntityQuery, NativeArray<EntityRemapInfo>)

Moves a selection of the entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(out NativeArray<Entity> output, EntityManager srcEntities, EntityQuery filter, NativeArray<EntityRemapUtility.EntityRemapInfo> entityRemapping)

Parameters

An array to receive the Entity objects of the transferred entities.

srcEntities

The EntityManager whose entities are appropriated.

A EntityQuery that defines the entities to move. Must be part of the source World. This query must not reference any types that implement IEnableableComponent.

A set of entity transformations to make during the transfer.

Remarks

After the move, the entities are managed by this EntityManager. Use the
output
array to make post-move changes to the transferred entities.
Each world has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(EntityManager, EntityQuery, NativeArray<EntityRemapInfo>)

Moves a selection of the entities managed by the specified EntityManager to the EntityManager.World of this EntityManager.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(EntityManager srcEntities, EntityQuery filter, NativeArray<EntityRemapUtility.EntityRemapInfo> entityRemapping)

Parameters

srcEntities

The EntityManager whose entities are appropriated.

A EntityQuery that defines the entities to move. Must be part of the source World. This query must not reference any types that implement IEnableableComponent.

A set of entity transformations to make during the transfer.

Remarks

After the move, the entities are managed by this EntityManager.
Each world has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.

MoveEntitiesFrom(NativeArray<Entity>, EntityManager, EntityQuery)

Moves a selection of the entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void MoveEntitiesFrom(out NativeArray<Entity> output, EntityManager srcEntities, EntityQuery filter)

Parameters

An array to receive the Entity objects of the transferred entities.

srcEntities

The EntityManager whose entities are appropriated.

A EntityQuery that defines the entities to move. Must be part of the source World. This query must not reference any types that implement IEnableableComponent.

Remarks

After the move, the entities are managed by this EntityManager. Use the
output
array to make post-move changes to the transferred entities.
Each world has one EntityManager, which manages all the entities in that world. This function allows you to transfer entities from one World to another.
Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before moving 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.