# EntityInChunk

> Represents a single entity within a chunk. Mainly used internally to sort lists of entities into chunk order.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule
* **Implements:** [IComparable\<EntityInChunk>](https://learn.microsoft.com/dotnet/api/system.icomparable-1), [IEquatable\<EntityInChunk>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct EntityInChunk : IComparable<EntityInChunk>, IEquatable<EntityInChunk>
```

## Static Properties

| Property                                                                     | Description                                                                                                      |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [Null](/engine/7000.0/script-reference/unity/entities/entityinchunk/null.md) | Null is a special value that does not refer to an actual entity. The chunk index it contains is ChunkIndex.Null. |

## Methods

| Method                                                                                 | Description                                                                                                                                |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [CompareTo](/engine/7000.0/script-reference/unity/entities/entityinchunk/compareto.md) | Compares two [EntityInChunk](/engine/7000.0/script-reference/unity/entities/entityinchunk.md) objects to determine their relative ordering |
| [Equals](/engine/7000.0/script-reference/unity/entities/entityinchunk/equals.md)       | Compares two [EntityInChunk](/engine/7000.0/script-reference/unity/entities/entityinchunk.md) instances for equality/                      |
