# Equals

> Determines whether the specified object is equal to this EntityId.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## Equals(Object)

Determines whether the specified object is equal to this EntityId.

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

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to compare with this EntityId. Non-EntityId values always return false.

### Returns

| Type                                                          | Description                                                                   |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the object is an EntityId and equals this instance; otherwise, false. |

## Equals(EntityId)

Determines whether the specified EntityId is equal to this EntityId.

```csharp
public bool Equals(EntityId other)
```

### Parameters

**** (\[EntityId]\(/engine/6000.7/script-reference/unityengine/entityid)): The EntityId to compare with this EntityId.

### Returns

| Type                                                          | Description                                        |
| ------------------------------------------------------------- | -------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the EntityIds are equal; otherwise, false. |

## Equals(int)

Determines whether the specified integer value is equal to this EntityId.

> **Warning:**
>
> **Removed.** EntityId will not be representable by an int in the future. This equals will be removed in a future version.

```csharp
public bool Equals(int other)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The integer value to compare with this EntityId.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the integer representation equals this EntityId; otherwise, false. |
