---
title: Equals
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/experimental/ai/polygonid/equals
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/experimental/ai/polygonid/equals.md
last_updated: 2026-10-07
generated_at: 2026-11-11T05:57:55.551Z
locale: en-us
---

# Equals

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

## Definition

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

## Equals(PolygonId)

Returns `true` if two [PolygonId](/engine/7000.0/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/7000.0/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/7000.0/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) |             |
