# EntityChanges

> Contains all the changes needed to convert and revert a world from one state to another.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public readonly struct EntityChanges : IDisposable
```

## Remarks

Changes that convert a world from one state to another are called **forward changes**. Changes that revert the world from one state to another are called **reverse changes**. EntityChanges store the changes in unmanaged memory. Call [EntityChanges.Dispose](/engine/7000.0/script-reference/unity/entities/entitychanges/dispose.md) to free the used memory

## Constructors

| Constructor                                                                                                                                          | Description                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [EntityChanges(Unity.Entities.EntityChangeSet,Unity.Entities.EntityChangeSet)](/engine/7000.0/script-reference/unity/entities/entitychanges/ctor.md) | Initializes a new instance of the [EntityChanges](/engine/7000.0/script-reference/unity/entities/entitychanges.md). |

## Properties

| Property                                                                                                   | Description                                      |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [AnyChanges](/engine/7000.0/script-reference/unity/entities/entitychanges/anychanges.md)                   | Checks if there is any forward or reverse change |
| [ForwardChangeSet](/engine/7000.0/script-reference/unity/entities/entitychanges/forwardchangeset.md)       | Access to the forward change set                 |
| [HasForwardChangeSet](/engine/7000.0/script-reference/unity/entities/entitychanges/hasforwardchangeset.md) | Checks if there is any forward change            |
| [HasReverseChangeSet](/engine/7000.0/script-reference/unity/entities/entitychanges/hasreversechangeset.md) | Checks if there is any reverse change            |
| [ReverseChangeSet](/engine/7000.0/script-reference/unity/entities/entitychanges/reversechangeset.md)       | Access to the reverse change set                 |

## Methods

| Method                                                                             | Description                                 |
| ---------------------------------------------------------------------------------- | ------------------------------------------- |
| [Dispose](/engine/7000.0/script-reference/unity/entities/entitychanges/dispose.md) | Disposes the memory used by the change sets |
