# Equals

> Reports whether this EntityArchetype references the same archetype as another object.

## Definition

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

## Equals(Object)

Reports whether this EntityArchetype references the same archetype as another object.

```csharp
public override bool Equals(object compare)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to compare.

### Returns

| Type                                                          | Description                                                                                     |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True, if the compare parameter is a EntityArchetype instance that points to the same archetype. |

## Equals(EntityArchetype)

Compares archetypes for equality.

```csharp
public bool Equals(EntityArchetype entityArchetype)
```

### Parameters

**** (\[EntityArchetype]\(/engine/7000.0/script-reference/unity/entities/entityarchetype)): The EntityArchetype to compare.

### Returns

| Type                                                          | Description                                                                   |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true, if both EntityArchetype instances reference the same archetype. |
