# PolygonId

> Represents a compact identifier for the data of a NavMesh node.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Experimental.AI](/engine/6000.3/script-reference/unityengine/experimental/ai.md)
* **Assembly:** UnityEngine.AIModule
* **Implements:** [IEquatable\<PolygonId>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

> **Warning:**
>
> **Deprecated.** The experimental PolygonId struct has been deprecated without replacement.

```csharp
public struct PolygonId : IEquatable<PolygonId>
```

## Remarks

It is used in [NavMeshQuery](/engine/6000.3/script-reference/unityengine/experimental/ai/navmeshquery.md) operations for pinpointing and getting access to relevant nodes in the NavMesh. Each node can be used by only one type of agent. Additional Resources: [NavMeshSurface](https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/api/Unity.AI.Navigation.NavMeshSurface.html).

This identifier becomes invalid once the node gets removed from the NavMesh, either by completely removing the surface or by modifying the surface in the node's immediate vicinity.

Additional Resources: [NavMeshQuery.IsValid](/engine/6000.3/script-reference/unityengine/experimental/ai/navmeshquery/isvalid.md).

## Methods

| Method                                                                                              | Description                                                                                                                                                                          |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Equals](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid/equals.md)           | Returns `true` if two [PolygonId](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid.md) objects refer to the same NavMesh node.                                  |
| [GetHashCode](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid/gethashcode.md) | Returns the hash code for use in collections.                                                                                                                                        |
| [IsNull](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid/isnull.md)           | Returns `true` if the [PolygonId](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid.md) has been created empty and has never pointed to any node in the NavMesh. |

## Operators

| Operator                                                                                              | Description                                                                                                                                                                          |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [operator ==](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid/op-equality.md)   | Returns `true` if two [PolygonId](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid.md) objects refer to the same NavMesh node or if they are both null.         |
| [operator !=](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid/op-inequality.md) | Returns `true` if two [PolygonId](/engine/6000.3/script-reference/unityengine/experimental/ai/polygonid.md) objects refer to different NavMesh nodes or if only one of them is null. |
