# Equals

> Returns true if two PolygonId objects refer to the same NavMesh node.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Experimental.AI](/engine/6000.7/script-reference/unityengine/experimental/ai.md)
* **Assembly:** UnityEngine.AIModule

## Equals(PolygonId)

Returns `true` if two [PolygonId](/engine/6000.7/script-reference/unityengine/experimental/ai/polygonid.md) objects refer to the same NavMesh node.

> **Warning:**
>
> **Deprecated.** The experimental PolygonId struct has been deprecated. Use NavNode instead.

```csharp
public bool Equals(PolygonId rhs)
```

### Parameters

**** (\[PolygonId]\(/engine/6000.7/script-reference/unityengine/experimental/ai/polygonid)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

## Equals(Object)

Returns `true` if two [PolygonId](/engine/6000.7/script-reference/unityengine/experimental/ai/polygonid.md) objects refer to the same NavMesh node.

> **Warning:**
>
> **Deprecated.** The experimental PolygonId struct has been deprecated. Use NavNode instead.

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

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |
