/// <summary> /// Generates a detailed change set for the world. /// All entities to be considered for diffing must have the <see cref="EntityGuid"/> component with a unique value. /// </summary> /// <remarks> /// The resulting <see cref="EntityChanges"/> must be disposed when no longer needed. /// </remarks> /// <param name="options">A set of options which can be toggled.</param> /// <param name="allocator">The allocator to use for the results object.</param> /// <returns>A set of changes for the world since the last fast-forward.</returns> public EntityChanges GetChanges(EntityManagerDifferOptions options, Allocator allocator) { var changes = EntityDiffer.GetChanges( srcEntityManager: m_SourceEntityManager, dstEntityManager: m_ShadowEntityManager, options, m_EntityQueryDesc, m_BlobAssetCache, allocator); return(changes); }
/// <summary> /// Generates a detailed change set for the world. /// All entities to be considered for diffing must have the <see cref="EntityGuid"/> component with a unique value. /// </summary> /// <remarks> /// The resulting <see cref="EntityChanges"/> must be disposed when no longer needed. /// </remarks> /// <param name="options">A set of options which can be toggled.</param> /// <param name="allocator">The allocator to use for the results object.</param> /// <returns>A set of changes for the world since the last fast-forward.</returns> public EntityChanges GetChanges(EntityManagerDifferOptions options, Allocator allocator) { #if ENABLE_UNITY_COLLECTIONS_CHECKS if (null == m_SourceEntityManager || null == m_ShadowEntityManager) { throw new ArgumentException($"The {nameof(EntityManagerDiffer)} has already been Disposed."); } #endif var changes = EntityDiffer.GetChanges( srcEntityManager: m_SourceEntityManager, dstEntityManager: m_ShadowEntityManager, options, m_EntityQueryDesc, m_BlobAssetCache, allocator); return(changes); }