Documentation

Unity Engine


Unity Engine


CopyAndReplaceEntitiesFrom(EntityManager, NativeArray<EntityRemapInfo>)

Copies all entities from srcEntityManager and replaces all entities in this EntityManager
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
Warning
Deprecated. This function only works in a narrow set of circumstances and has semantics that differ from a regular copy.
[ExcludeFromBurstCompatTesting("Accesses managed component store")]public void CopyAndReplaceEntitiesFrom(EntityManager srcEntityManager, NativeArray<EntityRemapUtility.EntityRemapInfo> remap = default)

Parameters

srcEntityManager

The EntityManager to copy from

Array of source versions and terget entities to perform remapping

Remarks

Guarantees that the chunk layout and order of the entities will match exactly, thus this method can be used for deterministic rollback. This feature is not complete and only supports a subset of the EntityManager features at the moment: " Currently it copies all CleanupComponents (They should not be copied) " Currently does not support class based components