Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

EntityManager.MoveEntitiesFrom

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void MoveEntitiesFrom(EntityManager srcEntities);

Parameters

Parameter Description
srcEntities The EntityManager whose entities are appropriated.

Description

Moves all entities managed by the specified EntityManager to the world of this EntityManager.

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.


Declaration

public void MoveEntitiesFrom(out NativeArray`1 output, EntityManager srcEntities);

Parameters

Parameter Description
output An array to receive the Entity objects of the transferred entities.
srcEntities The EntityManager whose entities are appropriated.

Description

Moves all entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.

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.


Declaration

public void MoveEntitiesFrom(out NativeArray`1 output, EntityManager srcEntities, NativeArray<EntityRemapInfo> entityRemapping);

Parameters

Parameter Description
output An array to receive the Entity objects of the transferred entities.
srcEntities The EntityManager whose entities are appropriated.
entityRemapping A set of entity transformations to make during the transfer.

Description

Moves all entities managed by the specified EntityManager to the EntityManager.World of this EntityManager and fills an array with their Entity objects.

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.


Declaration

public void MoveEntitiesFrom(EntityManager srcEntities, NativeArray<EntityRemapInfo> entityRemapping);

Parameters

Parameter Description
srcEntities The EntityManager whose entities are appropriated.
entityRemapping A set of entity transformations to make during the transfer.

Description

Moves all entities managed by the specified EntityManager to the EntityManager.World of this EntityManager.

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.


Declaration

public void MoveEntitiesFrom(EntityManager srcEntities, EntityQuery filter);

Parameters

Parameter Description
srcEntities The EntityManager whose entities are appropriated.
filter 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.

Description

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.

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.


Declaration

public void MoveEntitiesFrom(out NativeArray`1 output, EntityManager srcEntities, EntityQuery filter, NativeArray<EntityRemapInfo> entityRemapping);

Parameters

Parameter Description
output An array to receive the Entity objects of the transferred entities.
srcEntities The EntityManager whose entities are appropriated.
filter 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.
entityRemapping A set of entity transformations to make during the transfer.

Description

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.

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.


Declaration

public void MoveEntitiesFrom(EntityManager srcEntities, EntityQuery filter, NativeArray<EntityRemapInfo> entityRemapping);

Parameters

Parameter Description
srcEntities The EntityManager whose entities are appropriated.
filter 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.
entityRemapping A set of entity transformations to make during the transfer.

Description

Moves a selection of the entities managed by the specified EntityManager to the EntityManager.World of this EntityManager.

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.


Declaration

public void MoveEntitiesFrom(out NativeArray`1 output, EntityManager srcEntities, EntityQuery filter);

Parameters

Parameter Description
output An array to receive the Entity objects of the transferred entities.
srcEntities The EntityManager whose entities are appropriated.
filter 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.

Description

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.

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.