# operator ==(NavNode, NavNode)

> Determines whether two NavNode objects refer to the same NavMesh node.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.AI.Navigation.LowLevel](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public static bool operator ==(NavNode left, NavNode right)
```

### Parameters

**** (\[NavNode]\(/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode)): The [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) on the left side of the operator.**** (\[NavNode]\(/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode)): The NavNode on the right side of the operator.

### Returns

| Type                                                          | Description                                                                                                                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the two [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) values share the same identifier or are both null, `false` otherwise. |

### Remarks

This operator is a syntactic shortcut equivalent to calling [NavNode.Equals](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode/equals.md). Use it inside expressions where the `==` syntax is more concise than an explicit method call. Two null [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) values are considered equal.

Additional Resources: [NavNode.IsNull](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode/isnull.md)

### Examples

```csharp
using UnityEngine;
using Unity.AI.Navigation.LowLevel;

public class NavNodeEqualOperatorExample : MonoBehaviour
{
    NavNode m_Cached;

    void Update()
    {
        using NavWorld world = NavWorld.GetDefaultWorld();
        NavLocation current = world.MapLocation(transform.position, Vector3.one, 0);
        if (current.node == m_Cached)
            return;

        m_Cached = current.node;
        Debug.Log("Agent stepped onto a different NavMesh node.");
    }
}
```
