Struct EntityManagerDiffer
The EntityManagerDiffer is used to efficiently track changes to a given world over time.
Namespace: Unity.Entities
Syntax
public struct EntityManagerDiffer : IDisposable
Constructors
EntityManagerDiffer(World, Allocator)
Creates a stateful change tracker over the given world.
Declaration
public EntityManagerDiffer(World srcWorld, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
World | srcWorld | The input world to track changes for. |
Allocator | allocator | Allocator used for the cached state. |
Methods
Dispose()
Declaration
public void Dispose()
GetChanges(EntityManagerDifferOptions, Allocator)
Generates a detailed change set for the world. All entities to be considered for diffing must have the EntityGuid component with a unique value. The resulting EntityChanges must be disposed when no longer needed.
Declaration
public EntityChanges GetChanges(EntityManagerDifferOptions options, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
EntityManagerDifferOptions | options | A set of options which can be toggled. |
Allocator | allocator | The allocator to use for the results object. |
Returns
Type | Description |
---|---|
EntityChanges | A Change set containing the differences between the two worlds. |