# CompareTo(EntityInChunk)

> Compares two EntityInChunk objects to determine their relative ordering

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public int CompareTo(EntityInChunk other)
```

### Parameters

**** (\[EntityInChunk]\(/engine/7000.0/script-reference/unity/entities/entityinchunk)): The other instance to compare.

### Returns

| Type                                                       | Description                                                                                                                                            |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | -1 if this entity should be ordered earlier than `other`. 1 if this entity should be ordered later than `other`. 0 if the two entities are equivalent. |
